mailr22280 - /trunk/auto_analyses/relax_disp.py


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

Header


Content

Posted by edward on February 24, 2014 - 14:14:
Author: bugman
Date: Mon Feb 24 14:14:02 2014
New Revision: 22280

URL: http://svn.gna.org/viewcvs/relax?rev=22280&view=rev
Log:
Fix for the relaxation dispersion auto-analysis to improve its behaviour in 
the test suite.

The problem is that the auto-analysis acquires the execution lock 
(status.exec_lock) but if the
analysis cannot complete due to a bug, the lock is never released.  This 
causes nasty problems for
many subsequent tests, resulting in a cascade of test failures.  This is 
especially problematic in
the GUI tests where the execution lock controls many aspects of the interface.

The solution was simply to run the auto-analysis run() method within a 
try-finally statement.  The
release of the lock occurs in the 'finally' clause, guaranteeing its release.


Modified:
    trunk/auto_analyses/relax_disp.py

Modified: trunk/auto_analyses/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=22280&r1=22279&r2=22280&view=diff
==============================================================================
--- trunk/auto_analyses/relax_disp.py (original)
+++ trunk/auto_analyses/relax_disp.py Mon Feb 24 14:14:02 2014
@@ -113,12 +113,14 @@
         self.interpreter.on(verbose=False)
 
         # Execute.
-        self.run()
+        try:
+            self.run()
 
         # Finish and unlock execution.
-        status.auto_analysis[self.pipe_bundle].fin = True
-        status.current_analysis = None
-        status.exec_lock.release()
+        finally:
+            status.auto_analysis[self.pipe_bundle].fin = True
+            status.current_analysis = None
+            status.exec_lock.release()
 
 
     def is_model_for_selection(self, model=None):




Related Messages


Powered by MHonArc, Updated Mon Feb 24 14:20:02 2014