Open nginx config file in binary mode

This commit is contained in:
Jan Dittberner 2020-04-04 14:52:32 +02:00
parent 5ddddcaa08
commit 2227a39eb1

View file

@ -77,7 +77,7 @@ def create_web_vhost_config(username, sitename, wildcard):
config_file = None
try:
nginx_temp_file, filename = mkstemp()
config_file = os.fdopen(nginx_temp_file, 'w')
config_file = os.fdopen(nginx_temp_file, 'wb')
config_file.write(config_data.encode('utf8'))
finally:
if config_file: