mailr10861 - /branches/multi_processor_merge/multi/processor.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 23, 2010 - 17:36:
Author: bugman
Date: Tue Feb 23 17:36:09 2010
New Revision: 10861

URL: http://svn.gna.org/viewcvs/relax?rev=10861&view=rev
Log:
Fix for the Capturing_exception class.

Sometimes the exc_info does not correspond to an exception (i.e. 
sys.exc_info() returns None).  This
is now caught and the class returns silently.  The result is that the true 
traceback from the slaves
is printed!


Modified:
    branches/multi_processor_merge/multi/processor.py

Modified: branches/multi_processor_merge/multi/processor.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/multi/processor.py?rev=10861&r1=10860&r2=10861&view=diff
==============================================================================
--- branches/multi_processor_merge/multi/processor.py (original)
+++ branches/multi_processor_merge/multi/processor.py Tue Feb 23 17:36:09 2010
@@ -348,6 +348,11 @@
             (exception_type, exception_instance, exception_traceback) = 
sys.exc_info()
         else:
             (exception_type, exception_instance, exception_traceback) = 
exc_info
+
+        # This is not an exception!
+        if not exception_type:
+            return
+
         #PY3K: this check can be removed once string based exceptions are no 
longer used
         if isinstance(exception_type, str):
                 self.exception_name = exception_type + ' (legacy string 
exception)'




Related Messages


Powered by MHonArc, Updated Tue Feb 23 18:40:02 2010