Fix server startup on windows

This commit is contained in:
Julien Duponchelle 2017-04-28 11:06:39 +02:00
parent 273a711459
commit a6d085bf61
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -67,7 +67,7 @@ class Controller:
def load_appliances(self):
self._appliance_templates = {}
for file in os.listdir(get_resource('appliances')):
with open(os.path.join(get_resource('appliances'), file)) as f:
with open(os.path.join(get_resource('appliances'), file), 'r', encoding='utf-8') as f:
appliance = ApplianceTemplate(None, json.load(f))
if appliance.status != 'broken':
self._appliance_templates[appliance.id] = appliance