mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
PEP8 fixes
This commit is contained in:
parent
09007c7f0a
commit
eed65c63f1
@ -45,7 +45,7 @@ class Arbiter(object):
|
|||||||
# I love dynamic languages
|
# I love dynamic languages
|
||||||
SIG_QUEUE = []
|
SIG_QUEUE = []
|
||||||
SIGNALS = [getattr(signal, "SIG%s" % x)
|
SIGNALS = [getattr(signal, "SIG%s" % x)
|
||||||
for x in "HUP QUIT INT TERM TTIN TTOU USR1 USR2 WINCH".split()]
|
for x in "HUP QUIT INT TERM TTIN TTOU USR1 USR2 WINCH".split()]
|
||||||
SIG_NAMES = dict(
|
SIG_NAMES = dict(
|
||||||
(getattr(signal, name), name[3:].lower()) for name in dir(signal)
|
(getattr(signal, name), name[3:].lower()) for name in dir(signal)
|
||||||
if name[:3] == "SIG" and name[3] != "_"
|
if name[:3] == "SIG" and name[3] != "_"
|
||||||
@ -203,7 +203,7 @@ class Arbiter(object):
|
|||||||
raise
|
raise
|
||||||
except Exception:
|
except Exception:
|
||||||
self.log.info("Unhandled exception in main loop:\n%s",
|
self.log.info("Unhandled exception in main loop:\n%s",
|
||||||
traceback.format_exc())
|
traceback.format_exc())
|
||||||
self.stop(False)
|
self.stop(False)
|
||||||
if self.pidfile is not None:
|
if self.pidfile is not None:
|
||||||
self.pidfile.unlink()
|
self.pidfile.unlink()
|
||||||
@ -510,13 +510,13 @@ class Arbiter(object):
|
|||||||
raise
|
raise
|
||||||
except AppImportError as e:
|
except AppImportError as e:
|
||||||
self.log.debug("Exception while loading the application: \n%s",
|
self.log.debug("Exception while loading the application: \n%s",
|
||||||
traceback.format_exc())
|
traceback.format_exc())
|
||||||
print("%s" % e, file=sys.stderr)
|
print("%s" % e, file=sys.stderr)
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
sys.exit(self.APP_LOAD_ERROR)
|
sys.exit(self.APP_LOAD_ERROR)
|
||||||
except:
|
except:
|
||||||
self.log.exception("Exception in worker process:\n%s",
|
self.log.exception("Exception in worker process:\n%s",
|
||||||
traceback.format_exc())
|
traceback.format_exc())
|
||||||
if not worker.booted:
|
if not worker.booted:
|
||||||
sys.exit(self.WORKER_BOOT_ERROR)
|
sys.exit(self.WORKER_BOOT_ERROR)
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user