fix linter errors 🙄

This commit is contained in:
Jan Koppe 2020-04-27 10:10:05 +02:00
parent a9e1e9b1b4
commit f97720ac67
Signed by: thunfisch
GPG Key ID: BE935B0735A2129B
2 changed files with 11 additions and 10 deletions

View File

@ -23,8 +23,8 @@ def main():
if body["groupname"] == "concierge":
try:
pidfile = open('/run/supervisor.pid','r')
pid = int(pidfile.readline());
pidfile = open('/run/supervisor.pid', 'r')
pid = int(pidfile.readline())
os.kill(pid, signal.SIGQUIT)
except Exception as e:
write_stdout('could not kill supervisor: %s\n' % e.strerror)

View File

@ -28,6 +28,7 @@ interval = 2
# runtime stuff
claims = []
def svd_update():
try:
r = svd.supervisor.reloadConfig()
@ -88,7 +89,7 @@ def stop_task(uuid):
file = '/app/tasks.d/%s.conf' % uuid
try:
os.remove(file)
except:
except: # noqa
print('error deleting task configfile', file)
# reload supervisord config
@ -104,6 +105,7 @@ def release_task(uuid):
stop_task(uuid)
def claim_task(uuid):
global claims
r = requests.post('%s/claim/%s' % (base_url, uuid)).json()
@ -151,7 +153,6 @@ def loop(config):
claim_task(task.get('uuid'))
break
time.sleep(interval)