✏️ Small tweak to Python code

This commit is contained in:
Franck Nijhof 2020-07-26 20:31:57 +02:00
parent 348f8c2ec7
commit 8b8d96be6e
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

View file

@ -39,7 +39,7 @@ def testConfig(config):
except: except:
print("Failed to validate") print("Failed to validate")
raise raise
if result == False: if not result:
raise Exception("validation error") raise Exception("validation error")
return result return result
@ -51,7 +51,6 @@ def writeConfig(config, file):
r = requests.post(url="http://localhost:9090/-/reload", data={}) r = requests.post(url="http://localhost:9090/-/reload", data={})
except: except:
print("Exception") print("Exception")
pass
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()