* With decorator, the docstring of original method will be deleted.
 * Use functools.wraps() to keep the docstring of original method.
   Check
   
http://stackoverflow.com/questions/1782843/python-decorator-problem-with-docstrings
   for detail.

 * With this fix user can check method help message in interactive python with
   command:
    help(lsm.Client.volume_create)

Signed-off-by: Gris Ge <f...@redhat.com>
---
 python_binding/lsm/_common.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python_binding/lsm/_common.py b/python_binding/lsm/_common.py
index f2fd568..4c87661 100644
--- a/python_binding/lsm/_common.py
+++ b/python_binding/lsm/_common.py
@@ -533,6 +533,7 @@ def return_requires(*types):
     is quite important.
     """
     def outer(func):
+        @functools.wraps(func)
         def inner(*args, **kwargs):
             r = func(*args, **kwargs)
 
-- 
1.8.3.1


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libstoragemgmt-devel mailing list
Libstoragemgmt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libstoragemgmt-devel

Reply via email to