Set CORS headers only if set in config

This commit is contained in:
python273
2019-10-26 17:07:47 +03:00
parent 99f6758aae
commit 5643f9ae70
3 changed files with 21 additions and 20 deletions

View File

@ -79,7 +79,7 @@ def load_config(args):
elif config['ui']['display']['type'] in ('papirus', 'papi'):
config['ui']['display']['type'] = 'papirus'
elif config['ui']['display']['type'] in ('oledhat'):
elif config['ui']['display']['type'] in ('oledhat',):
config['ui']['display']['type'] = 'oledhat'
elif config['ui']['display']['type'] in ('ws_1', 'ws1', 'waveshare_1', 'waveshare1'):
@ -91,9 +91,9 @@ def load_config(args):
elif config['ui']['display']['type'] in ('ws_27inch', 'ws27inch', 'waveshare_27inch', 'waveshare27inch'):
config['ui']['display']['type'] = 'waveshare27inch'
elif config['ui']['display']['type'] in ('lcdhat'):
elif config['ui']['display']['type'] in ('lcdhat',):
config['ui']['display']['type'] = 'lcdhat'
else:
print("unsupported display type %s" % config['ui']['display']['type'])
exit(1)