diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-10-23 17:39:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-23 17:39:31 +0100 |
commit | 0d437698b2e040eface5094852576c43916c2e0c (patch) | |
tree | 9090c6c6f5ba5566786b8654cee07b3c3acd97c8 /synapse/http/servlet.py | |
parent | Merge pull request #2566 from matrix-org/rav/media_logcontext_leak (diff) | |
parent | fix vars named `l` (diff) | |
download | synapse-0d437698b2e040eface5094852576c43916c2e0c.tar.xz |
Merge pull request #2568 from matrix-org/rav/pep8
PEP8 fixes
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: |