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/streams | |
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/streams')
-rw-r--r-- | synapse/streams/config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/streams/config.py b/synapse/streams/config.py index 4f089bfb94..ca78e551cb 100644 --- a/synapse/streams/config.py +++ b/synapse/streams/config.py @@ -80,13 +80,13 @@ class PaginationConfig(object): from_tok = None # For backwards compat. elif from_tok: from_tok = StreamToken.from_string(from_tok) - except: + except Exception: raise SynapseError(400, "'from' paramater is invalid") try: if to_tok: to_tok = StreamToken.from_string(to_tok) - except: + except Exception: raise SynapseError(400, "'to' paramater is invalid") limit = get_param("limit", None) @@ -98,7 +98,7 @@ class PaginationConfig(object): try: return PaginationConfig(from_tok, to_tok, direction, limit) - except: + except Exception: logger.exception("Failed to create pagination config") raise SynapseError(400, "Invalid request.") |