Tidy with flake8

This commit is contained in:
Curtis
2015-04-11 22:50:11 +10:00
parent f6e5db93d8
commit 057cfe761f
211 changed files with 1622 additions and 1311 deletions
+13 -13
View File
@@ -10,25 +10,25 @@ counter = 0
def spoolerHandler(env):
global counter
# Spooler is handling a task
with open(LOGFILE, "a") as log:
print("%s" % (env['name']), file=log)
global counter
# Spooler is handling a task
with open(LOGFILE, "a") as log:
print("%s" % (env['name']), file=log)
counter += 1
counter += 1
if counter == len(tasks):
# Each task has been processed.
uwsgi.signal(17)
if counter == len(tasks):
# Each task has been processed.
uwsgi.signal(17)
# Spooler has done handling the task
return uwsgi.SPOOL_OK
# Spooler has done handling the task
return uwsgi.SPOOL_OK
uwsgi.spooler = spoolerHandler
# Clear the logfile
try:
remove(LOGFILE)
remove(LOGFILE)
except OSError, e: # log does not exist
pass
# print(e)
pass
# print(e)