From dd8ce8262767476d8c0984373018aa66d71e8da8 Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Nov 01 2017 23:37:37 +0000 Subject: Fix PEP8 failures in the tests The Style tests were failing on E722 due to two lines using bare excepts. This commit fixes this issue Signed-off-by: Ryan Lerch --- diff --git a/hubs/backend/worker.py b/hubs/backend/worker.py index c3c2f35..4f2507e 100755 --- a/hubs/backend/worker.py +++ b/hubs/backend/worker.py @@ -60,7 +60,7 @@ def handle_widget_cache(widget_idx, fn_name): with hubs.app.app.app_context(): # so url_for works widget_cache_work(widget_idx, fn_name) session.commit() # transaction is committed here - except: + except Exception: session.rollback() # rolls back the transaction raise finally: diff --git a/hubs/views/user.py b/hubs/views/user.py index a85337f..86905a0 100644 --- a/hubs/views/user.py +++ b/hubs/views/user.py @@ -69,7 +69,7 @@ def saved_notifs(): link = data['link'] icon = data['secondary_icon'] dom_id = data['dom_id'] - except: + except Exception: return flask.abort(400) notification = hubs.models.SavedNotification( username=user.username,