mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:56:04 -04:00
replace 'except:' with 'except Exception:'
what could possibly go wrong
This commit is contained in:
parent
ecf198aab8
commit
eaaabc6c4f
54 changed files with 93 additions and 93 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue