[pytango] 62/483: better exception handling

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:24 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 0e75dc7b2af916f72c33004c7bcd1d273037f4cd
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Wed Nov 16 07:03:14 2011 +0000

    better exception handling
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@18391 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 PyTango/ipython/ipython_00_10/ipython_00_10.py | 7 -------
 PyTango/ipython/ipython_00_11/ipython_00_11.py | 8 +-------
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/PyTango/ipython/ipython_00_10/ipython_00_10.py b/PyTango/ipython/ipython_00_10/ipython_00_10.py
index e8ac3fa..3ec67d2 100644
--- a/PyTango/ipython/ipython_00_10/ipython_00_10.py
+++ b/PyTango/ipython/ipython_00_10/ipython_00_10.py
@@ -517,13 +517,6 @@ def __exc_handler(ip, etype, value, tb):
         print etype.__name__ + ": " + str(value)
         print "(For more detailed information type: spock_error)"
 
-def __safe_tango_exec(f, *args, **kwargs):
-    try:
-        return f(*args, **kwargs)
-    except PyTango.DevFailed, df:
-        print df[0].reason,":",df[0].desc
-        print "For more information type: get_last_tango_error"
-
 def __get_default_tango_host():
     global _DFT_TANGO_HOST
     if _DFT_TANGO_HOST is None:
diff --git a/PyTango/ipython/ipython_00_11/ipython_00_11.py b/PyTango/ipython/ipython_00_11/ipython_00_11.py
index 8442330..6e7d94f 100644
--- a/PyTango/ipython/ipython_00_11/ipython_00_11.py
+++ b/PyTango/ipython/ipython_00_11/ipython_00_11.py
@@ -519,13 +519,6 @@ def __exc_handler(ip, etype, value, tb, tb_offset=None):
         print etype.__name__ + ": " + str(value)
         print "(For more detailed information type: spock_error)"
 
-def __safe_tango_exec(f, *args, **kwargs):
-    try:
-        return f(*args, **kwargs)
-    except PyTango.DevFailed, df:
-        print df[0].reason,":",df[0].desc
-        print "For more information type: get_last_tango_error"
-
 def __get_default_tango_host():
     global _DFT_TANGO_HOST
     if _DFT_TANGO_HOST is None:
@@ -866,6 +859,7 @@ def init_magic(ip):
     __expose_magic(ip, "lsdevclass", magic_lsdevclass)
     __expose_magic(ip, "lsserv", magic_lsserv)
     __expose_magic(ip, "tango_error", magic_tango_error)
+    __expose_magic(ip, "tango_error", magic_spock_error)
     __expose_magic(ip, "mon", magic_mon, __monitor_completer)
     #__expose_magic(ip, "umon", magic_umon, __monitor_completer)
     

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