summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2012-11-28 15:35:48 (GMT)
committerMartin Sivak <msivak@redhat.com>2012-11-28 15:35:48 (GMT)
commit5747378d9a25fac1ac163db34d64264511fe5090 (patch)
tree879383a3b011a9b2f7c4a3e0549f420704273bc7
parenteaf15a48414d1d3417afa407f83291732b30abb8 (diff)
downloadpython-di-5747378d9a25fac1ac163db34d64264511fe5090.zip
python-di-5747378d9a25fac1ac163db34d64264511fe5090.tar.gz
python-di-5747378d9a25fac1ac163db34d64264511fe5090.tar.xz
Add wraps call around class decorator in inject
-rw-r--r--di/core.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/di/core.py b/di/core.py
index db3202e..f41d601 100644
--- a/di/core.py
+++ b/di/core.py
@@ -133,8 +133,8 @@ def inject(*args, **kwargs):
return obj
if not isinstance(obj, DiRegistry):
- obj = DiRegistry(obj)
-
+ obj = wraps(obj)(DiRegistry(obj))
+
obj.register(*args, **kwargs)
return obj