Skip to content

Commit

Permalink
Merge pull request #1201 from bloodearnest/double_exc
Browse files Browse the repository at this point in the history
Clean up traceback printing in arbitar
  • Loading branch information
benoitc committed Feb 9, 2016
2 parents d6a47e8 + 0acfb55 commit a3e3ee8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions gunicorn/arbiter.py
Expand Up @@ -207,8 +207,8 @@ def run(self):
except SystemExit:
raise
except Exception:
self.log.info("Unhandled exception in main loop:\n%s",
traceback.format_exc())
self.log.info("Unhandled exception in main loop",
exc_info=1)
self.stop(False)
if self.pidfile is not None:
self.pidfile.unlink()
Expand Down Expand Up @@ -518,14 +518,13 @@ def spawn_worker(self):
except SystemExit:
raise
except AppImportError as e:
self.log.debug("Exception while loading the application: \n%s",
traceback.format_exc())
self.log.debug("Exception while loading the application",
exc_info=1)
print("%s" % e, file=sys.stderr)
sys.stderr.flush()
sys.exit(self.APP_LOAD_ERROR)
except:
self.log.exception("Exception in worker process:\n%s",
traceback.format_exc())
self.log.exception("Exception in worker process"),
if not worker.booted:
sys.exit(self.WORKER_BOOT_ERROR)
sys.exit(-1)
Expand Down

0 comments on commit a3e3ee8

Please sign in to comment.