Skip to content
Permalink
Browse files

Fix potential use-before-defined of serverList variable

  • Loading branch information
nOOb3167 authored and sfan5 committed May 18, 2018
1 parent 23d45c0 commit f43f201af5272dcf6b3aea378cd06e838645f98c
Showing with 3 additions and 3 deletions.
  1. +3 −3 server.py
@@ -139,9 +139,6 @@ def announce():

return "Thanks, your request has been filed.", 202

sched.add_job(lambda: serverList.purgeOld(), "interval",
seconds=60, coalesce=True, max_instances=1)

# Utilities

# Returns ping time in seconds (up), False (down), or None (error).
@@ -401,6 +398,9 @@ def update(self, server):

serverList = ServerList()

sched.add_job(lambda: serverList.purgeOld(), "interval",
seconds=60, coalesce=True, max_instances=1)

if __name__ == "__main__":
app.run(host = app.config["HOST"], port = app.config["PORT"])

0 comments on commit f43f201

Please sign in to comment.