[pyramid] Get rid of a couple of bare "except"
authorDenis Laxalde <denis.laxalde@logilab.fr>
Mon, 30 Oct 2017 09:32:26 +0100
changeset 12225 a8ed10f80a85
parent 12224 5c066dc7307b
child 12226 2e2425d2d54d
[pyramid] Get rid of a couple of bare "except"
cubicweb/pyramid/core.py
cubicweb/pyramid/session.py
--- a/cubicweb/pyramid/core.py	Mon Oct 30 09:28:52 2017 +0100
+++ b/cubicweb/pyramid/core.py	Mon Oct 30 09:32:26 2017 +0100
@@ -369,7 +369,7 @@
     try:
         session = repo_connect(request, repo, eid=login)
         request._cw_cached_session = session
-    except:
+    except Exception:
         log.exception("Failed")
         raise
 
--- a/cubicweb/pyramid/session.py	Mon Oct 30 09:28:52 2017 +0100
+++ b/cubicweb/pyramid/session.py	Mon Oct 30 09:32:26 2017 +0100
@@ -102,7 +102,7 @@
         def newfn(*args, **kw):
             try:
                 return fn(*args, **kw)
-            except:
+            except Exception:
                 logger.exception("Error in %s" % fn.__name__)
         return newfn
     return wrap