[pytango] 457/483: Fixes #714

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:15:12 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit b391e9676f843f5df1f97077dba1ad2f7f0ef1d3
Author: coutinho <coutinho at esrf.fr>
Date:   Mon Apr 13 11:37:54 2015 +0200

    Fixes #714
---
 src/boost/python/device_proxy.py | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/boost/python/device_proxy.py b/src/boost/python/device_proxy.py
index ad1abc7..402a394 100644
--- a/src/boost/python/device_proxy.py
+++ b/src/boost/python/device_proxy.py
@@ -163,7 +163,10 @@ def __DeviceProxy__refresh_cmd_cache(self):
     cmd_cache = {}
     for cmd in cmd_list:
         n = cmd.cmd_name.lower()
-        cmd_cache[n] = cmd, None
+        doc = "%s(%s) -> %s\n\n" % (cmd.cmd_name, cmd.in_type, cmd.out_type)
+        doc += " -  in (%s): %s\n" % (cmd.in_type, cmd.in_type_desc)
+        doc += " - out (%s): %s\n" % (cmd.out_type, cmd.out_type_desc)
+        cmd_cache[n] = cmd, doc
     self.__dict__['__cmd_cache'] = cmd_cache
 
 def __DeviceProxy__refresh_attr_cache(self):
@@ -190,14 +193,10 @@ def __DeviceProxy__getattr(self, name):
         pass
 
     if cmd_info is not None:
-        d, f = cmd_info
-        if f is None:
-            doc = "%s(%s) -> %s\n\n" % (d.cmd_name, d.in_type, d.out_type)
-            doc += " -  in (%s): %s\n" % (d.in_type, d.in_type_desc)
-            doc += " - out (%s): %s\n" % (d.out_type, d.out_type_desc)
-            def f(*args, **kwds): return self.command_inout(name, *args, **kwds)
-            f.__doc__ = doc
-            self.__cmd_cache[name_l] = d, f
+        _, doc = cmd_info
+        def f(*args, **kwds):
+            return self.command_inout(name, *args, **kwds)
+        f.__doc__ = doc
         return f
 
     find_attr = True

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list