From cc8e67ea83ce1064ef605d82130ace2a3670d68a Mon Sep 17 00:00:00 2001 From: Randall Leeds Date: Sat, 16 Mar 2019 16:11:02 -0700 Subject: [PATCH] Fix new pylint errors --- gunicorn/util.py | 3 +-- gunicorn/workers/geventlet.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/gunicorn/util.py b/gunicorn/util.py index 37e586a8..3ec54af0 100644 --- a/gunicorn/util.py +++ b/gunicorn/util.py @@ -369,8 +369,7 @@ def import_app(module): if module.endswith(".py") and os.path.exists(module): msg = "Failed to find application, did you mean '%s:%s'?" raise ImportError(msg % (module.rsplit(".", 1)[0], obj)) - else: - raise + raise mod = sys.modules[module] diff --git a/gunicorn/workers/geventlet.py b/gunicorn/workers/geventlet.py index 91d2f333..20f29734 100644 --- a/gunicorn/workers/geventlet.py +++ b/gunicorn/workers/geventlet.py @@ -92,8 +92,7 @@ class EventletWorker(AsyncWorker): def is_already_handled(self, respiter): if respiter == EVENTLET_ALREADY_HANDLED: raise StopIteration() - else: - return super().is_already_handled(respiter) + return super().is_already_handled(respiter) def init_process(self): super().init_process()