diff options
author | Erik Johnston <erikj@jki.re> | 2016-08-22 12:13:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-22 12:13:07 +0100 |
commit | e65bc7d3153db2c2670a5bd255dd76a6906679d4 (patch) | |
tree | f96f7e285fbb4d678fab6e95e7ec936859027cd6 /synapse/util | |
parent | Merge pull request #1032 from matrix-org/matthew/workerdoc (diff) | |
parent | Add exception logging. Fix typo (diff) | |
download | synapse-e65bc7d3153db2c2670a5bd255dd76a6906679d4.tar.xz |
Merge pull request #1031 from matrix-org/erikj/measure_notifier
Add more Measure blocks
Diffstat (limited to 'synapse/util')
-rw-r--r-- | synapse/util/metrics.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/metrics.py b/synapse/util/metrics.py index 76f301f549..4ea930d3e8 100644 --- a/synapse/util/metrics.py +++ b/synapse/util/metrics.py @@ -87,7 +87,7 @@ class Measure(object): self.db_txn_duration = self.start_context.db_txn_duration def __exit__(self, exc_type, exc_val, exc_tb): - if exc_type is not None or not self.start_context: + if isinstance(exc_type, Exception) or not self.start_context: return duration = self.clock.time_msec() - self.start |