Skip to content

Instantly share code, notes, and snippets.

@abadger
Last active August 29, 2015 14:11
Show Gist options
  • Save abadger/2ba4f3117078c9a293e1 to your computer and use it in GitHub Desktop.
Save abadger/2ba4f3117078c9a293e1 to your computer and use it in GitHub Desktop.
Index: q-2.5/q.py
===================================================================
--- q-2.5.orig/q.py
+++ q-2.5/q.py
@@ -66,7 +66,7 @@ else:
class Q(object):
__doc__ = __doc__ # from the module's __doc__ above
- import ast, code, inspect, os, pydoc, sys, random, re, time, pprint
+ import ast, code, inspect, functools, os, pydoc, sys, random, re, time, pprint
# The debugging log will go to this file; temporary files will also have
# this path as a prefix, followed by a random number.
@@ -293,7 +293,7 @@ class Q(object):
self.NORMAL])
self.writer.write(s.chunks)
return result
- return wrapper
+ return self.functools.update_wrapper(wrapper, func)
def __call__(self, *args):
"""If invoked as a decorator on a function, adds tracing output to the
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment