summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-10-24 15:02:25 +0100
committerErik Johnston <erik@matrix.org>2017-10-24 15:02:25 +0100
commitf009df23ec711e943d958bb0a0e3185d42d7cc79 (patch)
tree30fa4558fe72f9429b0d533d12653dc786ad9692 /synapse/http
parentMerge branch 'release-v0.24.0' of github.com:matrix-org/synapse (diff)
parentBump version and changelog (diff)
downloadsynapse-f009df23ec711e943d958bb0a0e3185d42d7cc79.tar.xz
Merge branch 'release-v0.24.1' of github.com:matrix-org/synapse v0.24.1
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/matrixfederationclient.py2
-rw-r--r--synapse/http/server.py2
-rw-r--r--synapse/http/servlet.py6
-rw-r--r--synapse/http/site.py2
4 files changed, 6 insertions, 6 deletions
diff --git a/synapse/http/matrixfederationclient.py b/synapse/http/matrixfederationclient.py
index 8c8b7fa656..833496b72d 100644
--- a/synapse/http/matrixfederationclient.py
+++ b/synapse/http/matrixfederationclient.py
@@ -550,7 +550,7 @@ class MatrixFederationHttpClient(object):
                 length = yield _readBodyToFile(
                     response, output_stream, max_size
                 )
-        except:
+        except Exception:
             logger.exception("Failed to download body")
             raise
 
diff --git a/synapse/http/server.py b/synapse/http/server.py
index 8a27e3b422..3ca1c9947c 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -130,7 +130,7 @@ def wrap_request_handler(request_handler, include_metrics=False):
                             pretty_print=_request_user_agent_is_curl(request),
                             version_string=self.version_string,
                         )
-                    except:
+                    except Exception:
                         logger.exception(
                             "Failed handle request %s.%s on %r: %r",
                             request_handler.__module__,
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:
diff --git a/synapse/http/site.py b/synapse/http/site.py
index 4b09d7ee66..cd1492b1c3 100644
--- a/synapse/http/site.py
+++ b/synapse/http/site.py
@@ -67,7 +67,7 @@ class SynapseRequest(Request):
             ru_utime, ru_stime = context.get_resource_usage()
             db_txn_count = context.db_txn_count
             db_txn_duration = context.db_txn_duration
-        except:
+        except Exception:
             ru_utime, ru_stime = (0, 0)
             db_txn_count, db_txn_duration = (0, 0)