Skip to content

Commit

Permalink
Remove unused import and pass True instead of 1
Browse files Browse the repository at this point in the history
The logging module checks exc_info as

    if exc_info:
        # ...

so passing True would be more readable.
  • Loading branch information
berkerpeksag committed Feb 12, 2016
1 parent 7db09f1 commit 51f49f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gunicorn/arbiter.py
Expand Up @@ -11,7 +11,6 @@
import signal
import sys
import time
import traceback

from gunicorn.errors import HaltServer, AppImportError
from gunicorn.pidfile import Pidfile
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

1 comment on commit 51f49f4

@benoitc
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Please sign in to comment.