[pytango] 90/483: fix bug in dynamic attributes

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:27 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 586d6147a59819ba73f8f119c05fdadbfc74750b
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Thu Jan 5 10:07:59 2012 +0000

    fix bug in dynamic attributes
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@18830 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 PyTango/device_server.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/PyTango/device_server.py b/PyTango/device_server.py
index ca44355..1973cc8 100644
--- a/PyTango/device_server.py
+++ b/PyTango/device_server.py
@@ -372,14 +372,14 @@ def __DeviceImpl___remove_attr_meth(self,attr_name):
         if hasattr(self.__class__, r_meth_name):
             delattr(self.__class__, r_meth_name)
 
-    w_meth_name = 'write_%s' % attr_name
-    if hasattr(self.__class__, w_meth_name):
-        delattr(self.__class__, w_meth_name)
-
-    allo_meth_name = 'is_%s_allowed' % attr_name
-    if hasattr(self.__class__, allo_meth_name):
-        delattr(self.__class__, allo_meth_name)
-    cl.dyn_att_added_methods.remove(attr_name)
+        w_meth_name = 'write_%s' % attr_name
+        if hasattr(self.__class__, w_meth_name):
+            delattr(self.__class__, w_meth_name)
+
+        allo_meth_name = 'is_%s_allowed' % attr_name
+        if hasattr(self.__class__, allo_meth_name):
+            delattr(self.__class__, allo_meth_name)
+        cl.dyn_att_added_methods.remove(attr_name)
 
 def __join_msg(msg):
     return ' '.join(map(str, msg))

-- 
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