summary refs log tree commit diff
path: root/synapse/util/__init__.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-10-23 15:52:32 +0100
committerRichard van der Hoff <richard@matrix.org>2017-10-23 15:52:32 +0100
commiteaaabc6c4f93d49f090ef7ff930fa2739428a36f (patch)
treef5e5f3565589bc31d3dc9580608148b9d2f03a7c /synapse/util/__init__.py
parentMerge pull request #2566 from matrix-org/rav/media_logcontext_leak (diff)
downloadsynapse-eaaabc6c4f93d49f090ef7ff930fa2739428a36f.tar.xz
replace 'except:' with 'except Exception:'
what could possibly go wrong
Diffstat (limited to 'synapse/util/__init__.py')
-rw-r--r--synapse/util/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py
index 2a2360ab5d..cd1ce62bdb 100644
--- a/synapse/util/__init__.py
+++ b/synapse/util/__init__.py
@@ -82,7 +82,7 @@ class Clock(object):
     def cancel_call_later(self, timer, ignore_errs=False):
         try:
             timer.cancel()
-        except:
+        except Exception:
             if not ignore_errs:
                 raise
 
@@ -97,12 +97,12 @@ class Clock(object):
 
             try:
                 ret_deferred.errback(e)
-            except:
+            except Exception:
                 pass
 
             try:
                 given_deferred.cancel()
-            except:
+            except Exception:
                 pass
 
         timer = None
@@ -110,7 +110,7 @@ class Clock(object):
         def cancel(res):
             try:
                 self.cancel_call_later(timer)
-            except:
+            except Exception:
                 pass
             return res
 
@@ -119,7 +119,7 @@ class Clock(object):
         def success(res):
             try:
                 ret_deferred.callback(res)
-            except:
+            except Exception:
                 pass
 
             return res
@@ -127,7 +127,7 @@ class Clock(object):
         def err(res):
             try:
                 ret_deferred.errback(res)
-            except:
+            except Exception:
                 pass
 
         given_deferred.addCallbacks(callback=success, errback=err)