From 8927a22f09f884d86eafb59c566f57560f1f0441 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 12 Feb 2016 09:20:55 +0200 Subject: [PATCH] Remove unused import and pass True instead of 1 The logging module checks exc_info as if exc_info: # ... so passing True would be more readable. --- gunicorn/arbiter.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index 48df93e6a7..1b55672d0c 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -11,7 +11,6 @@ import signal import sys import time -import traceback from gunicorn.errors import HaltServer, AppImportError from gunicorn.pidfile import Pidfile @@ -208,7 +207,7 @@ def run(self): raise except Exception: self.log.info("Unhandled exception in main loop", - exc_info=1) + exc_info=True) self.stop(False) if self.pidfile is not None: self.pidfile.unlink() @@ -519,7 +518,7 @@ def spawn_worker(self): raise except AppImportError as e: self.log.debug("Exception while loading the application", - exc_info=1) + exc_info=True) print("%s" % e, file=sys.stderr) sys.stderr.flush() sys.exit(self.APP_LOAD_ERROR)