diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-17 17:19:22 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-17 17:19:22 +0000 |
commit | 1489521ee5e5edd4d3d8735e1a3a5f6a9c7ee58b (patch) | |
tree | 7be6d77f2181236f1b4391fad5c9ddffc909b628 /synapse | |
parent | pep8 (diff) | |
download | synapse-1489521ee5e5edd4d3d8735e1a3a5f6a9c7ee58b.tar.xz |
Be polite and ensure we use @functools.wraps() when creating a function decorator
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/_base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 2979a83524..9125bb1198 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -25,6 +25,7 @@ import synapse.metrics from twisted.internet import defer from collections import namedtuple, OrderedDict +import functools import simplejson as json import sys import time @@ -81,6 +82,7 @@ def cached(max_entries=1000): cache[key] = value + @functools.wraps(orig) @defer.inlineCallbacks def wrapped(self, key): if key in cache: |