Fix AttributeError when --reload was not passed (#1806)

Fixes #1805
This commit is contained in:
Berker Peksag 2018-06-11 22:04:08 +03:00 committed by GitHub
parent a64d712f7a
commit 21f0adc346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,13 @@
Changelog
=========
19.x / not released
===================
- fix: prevent raising :exc:`AttributeError` when ``--reload`` is not passed
in case of a :exc:`SyntaxError` raised from the WSGI application.
(:issue:`1805`, :pr:`1806`)
19.8.1 / 2018/04/30
===================

View File

@ -137,7 +137,7 @@ class Worker(object):
try:
self.wsgi = self.app.wsgi()
except SyntaxError as e:
if self.cfg.reload == 'off':
if not self.cfg.reload:
raise
self.log.exception(e)