[pytango] 26/483: fixes #3294507

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:21 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 e2e9a9a33bdd6f36841c4dcf22eb33ae325c8eae
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Mon May 2 13:30:25 2011 +0000

    fixes #3294507
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@16754 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 PyTango/ipython/ipython_00_10.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/PyTango/ipython/ipython_00_10.py b/PyTango/ipython/ipython_00_10.py
index d2e2074..157c3a6 100644
--- a/PyTango/ipython/ipython_00_10.py
+++ b/PyTango/ipython/ipython_00_10.py
@@ -492,8 +492,11 @@ def __tango_exc_handler(ip, etype, value, tb):
     global _SPOCK_ERR
     ip.user_ns[_SPOCK_ERR] = etype, value, tb
     if etype == PyTango.DevFailed:
-        v = value[0]
-        print v.reason,":",v.desc
+        if len(value.args):
+            v = value[0]
+            print v.reason,":",v.desc
+        else:
+            print "Empty DevFailed"
         print "For more detailed information type: tango_error"
         
 def __safe_tango_exec(f, *args, **kwargs):
@@ -759,6 +762,7 @@ def init_pytango(ip):
     ip.set_hook('complete_command', attr_completer, re_key = ".*AttributeProxy[^\w\.]+")
     ip.set_hook('complete_command', attr_completer, re_key = ".*Attribute[^\w\.]+")
     
+    ip
     ip.set_custom_exc((PyTango.DevFailed,), __tango_exc_handler)
 
 def init_db(ip, parameter_s=''):

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