Skip to content
Snippets Groups Projects
Commit 1489521e authored by Paul "LeoNerd" Evans's avatar Paul "LeoNerd" Evans
Browse files

Be polite and ensure we use @functools.wraps() when creating a function decorator

parent 6d33f977
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment