Author: bugman Date: Tue May 20 13:38:04 2014 New Revision: 23255 URL: http://svn.gna.org/viewcvs/relax?rev=23255&view=rev Log: Merged revisions 23254 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r23254 | bugman | 2014-05-20 13:37:32 +0200 (Tue, 20 May 2014) | 12 lines Fix for the chain-reaction failures in the test suite. This fixes bug #22055 (https://gna.org/bugs/?22055), the processor.run_queue() not cleaning up in uni_processor - chain-reaction failures in the test suite. The fix was insanely simple, just implementing what was mentioned Gary's FIXME comment in the run_queue() method of the uni-processor object. The queue execution code has been placed inside a 'try' statement and the queue cleaning up code in a 'finally' statement. This closes a painfully difficult to find bug that has been in relax since 2006. ........ Modified: branches/frame_order_cleanup/ (props changed) branches/frame_order_cleanup/multi/uni_processor.py Propchange: branches/frame_order_cleanup/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue May 20 13:38:04 2014 @@ -1 +1 @@ -/trunk:1-23236 +/trunk:1-23254 Modified: branches/frame_order_cleanup/multi/uni_processor.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/multi/uni_processor.py?rev=23255&r1=23254&r2=23255&view=diff ============================================================================== --- branches/frame_order_cleanup/multi/uni_processor.py (original) +++ branches/frame_order_cleanup/multi/uni_processor.py Tue May 20 13:38:04 2014 @@ -175,15 +175,18 @@ def run_queue(self): - #FIXME: need a finally here to cleanup exceptions states for windows etc + """Safely run each command in the queue, cleaning up after failures.""" - last_command = len(self.command_queue)-1 - for i, command in enumerate(self.command_queue): - completed = (i == last_command) + # Run each command in the queue. + try: + last_command = len(self.command_queue)-1 + for i, command in enumerate(self.command_queue): + completed = (i == last_command) - command.run(self, completed) + command.run(self, completed) - #self.run_command_queue() - #TODO: add cheques for empty queues and maps if now warn - del self.command_queue[:] - self.memo_map.clear() + # Clear the queue, even if a failure occurs. + finally: + #TODO: add cheques for empty queues and maps if now warn + del self.command_queue[:] + self.memo_map.clear()