2 files changed, 0 insertions, 2 deletions
diff --git a/synapse/logging/context.py b/synapse/logging/context.py
index 25e78cc82f..d4ee893376 100644
--- a/synapse/logging/context.py
+++ b/synapse/logging/context.py
@@ -68,7 +68,6 @@ try:
def get_thread_resource_usage() -> "Optional[resource.struct_rusage]":
return resource.getrusage(RUSAGE_THREAD)
-
except Exception:
# If the system doesn't support resource.getrusage(RUSAGE_THREAD) then we
# won't track resource usage.
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py
index eb96f7e665..3f11a2f9dd 100644
--- a/synapse/util/caches/lrucache.py
+++ b/synapse/util/caches/lrucache.py
@@ -69,7 +69,6 @@ try:
sizer.exclude_refs((), None, "")
return sizer.asizeof(val, limit=100 if recurse else 0)
-
except ImportError:
def _get_size_of(val: Any, *, recurse: bool = True) -> int:
|