diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-10-23 15:52:32 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-10-23 15:52:32 +0100 |
commit | eaaabc6c4f93d49f090ef7ff930fa2739428a36f (patch) | |
tree | f5e5f3565589bc31d3dc9580608148b9d2f03a7c /synapse/http/servlet.py | |
parent | Merge pull request #2566 from matrix-org/rav/media_logcontext_leak (diff) | |
download | synapse-eaaabc6c4f93d49f090ef7ff930fa2739428a36f.tar.xz |
replace 'except:' with 'except Exception:'
what could possibly go wrong
Diffstat (limited to 'synapse/http/servlet.py')
-rw-r--r-- | synapse/http/servlet.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/http/servlet.py b/synapse/http/servlet.py index 9a4c36ad5d..8118ee7cc2 100644 --- a/synapse/http/servlet.py +++ b/synapse/http/servlet.py @@ -48,7 +48,7 @@ def parse_integer_from_args(args, name, default=None, required=False): if name in args: try: return int(args[name][0]) - except: + except Exception: message = "Query parameter %r must be an integer" % (name,) raise SynapseError(400, message) else: @@ -88,7 +88,7 @@ def parse_boolean_from_args(args, name, default=None, required=False): "true": True, "false": False, }[args[name][0]] - except: + except Exception: message = ( "Boolean query parameter %r must be one of" " ['true', 'false']" @@ -162,7 +162,7 @@ def parse_json_value_from_request(request): """ try: content_bytes = request.content.read() - except: + except Exception: raise SynapseError(400, "Error reading JSON content.") try: |