summary refs log tree commit diff
path: root/synapse/logging/context.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-12-13 11:32:53 +0000
committerGitHub <noreply@github.com>2019-12-13 11:32:53 +0000
commit5cadbd9ebb6cc9e6e2e15ab3f77fcbca47d53392 (patch)
tree811fec2b55d1566cc294de5747842d615932b8d4 /synapse/logging/context.py
parentMerge branch 'master' into develop (diff)
parentNewsfile (diff)
downloadsynapse-5cadbd9ebb6cc9e6e2e15ab3f77fcbca47d53392.tar.xz
Merge pull request #6537 from matrix-org/erikj/bump_mypy_version
Bump mypy version
Diffstat (limited to 'synapse/logging/context.py')
-rw-r--r--synapse/logging/context.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/logging/context.py b/synapse/logging/context.py
index 6747f29e6a..33b322209d 100644
--- a/synapse/logging/context.py
+++ b/synapse/logging/context.py
@@ -405,6 +405,9 @@ class LoggingContext(object):
         """
         current = get_thread_resource_usage()
 
+        # Indicate to mypy that we know that self.usage_start is None.
+        assert self.usage_start is not None
+
         utime_delta = current.ru_utime - self.usage_start.ru_utime
         stime_delta = current.ru_stime - self.usage_start.ru_stime