mailr14249 - /1.3/data/__init__.py


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

Header


Content

Posted by edward on August 08, 2011 - 11:12:
Author: bugman
Date: Mon Aug  8 11:12:46 2011
New Revision: 14249

URL: http://svn.gna.org/viewcvs/relax?rev=14249&view=rev
Log:
Bug fix for the saving/loading of a results file in GUI mode.

The save files were containing the ds.relax_gui object and restoring it on 
loading.  This caused
the data storage of the GUI to change underneath the GUI resulting in a crash 
or race conditions.


Modified:
    1.3/data/__init__.py

Modified: 1.3/data/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/data/__init__.py?rev=14249&r1=14248&r2=14249&view=diff
==============================================================================
--- 1.3/data/__init__.py (original)
+++ 1.3/data/__init__.py Mon Aug  8 11:12:46 2011
@@ -356,27 +356,27 @@
         top_element.setAttribute('time', asctime())
 
         # Add all objects in the data store base object to the XML element.
-        blacklist = list(self.__class__.__dict__.keys() + 
dict.__dict__.keys())
-        for name in dir(self):
-            # Skip blacklisted objects.
-            if name in blacklist:
-                continue
-
-            # Skip special objects.
-            if search('^_', name):
-                continue
-
-            # Execute any to_xml() methods, and add that object to the 
blacklist.
-            obj = getattr(self, name)
-            if hasattr(obj, 'to_xml'):
-                obj.to_xml(xmldoc, top_element)
-                blacklist = blacklist + [name]
-
-        # Remove the current data pipe from the blacklist!
-        blacklist.remove('current_pipe')
-
-        # Add all simple python objects within the PipeContainer to the pipe 
element.
         if all:
+            blacklist = list(self.__class__.__dict__.keys() + 
dict.__dict__.keys())
+            for name in dir(self):
+                # Skip blacklisted objects.
+                if name in blacklist:
+                    continue
+
+                # Skip special objects.
+                if search('^_', name):
+                    continue
+
+                # Execute any to_xml() methods, and add that object to the 
blacklist.
+                obj = getattr(self, name)
+                if hasattr(obj, 'to_xml'):
+                    obj.to_xml(xmldoc, top_element)
+                    blacklist = blacklist + [name]
+
+            # Remove the current data pipe from the blacklist!
+            blacklist.remove('current_pipe')
+
+            # Add all simple python objects within the store.
             fill_object_contents(xmldoc, top_element, object=self, 
blacklist=blacklist)
 
         # Loop over the pipes.




Related Messages


Powered by MHonArc, Updated Mon Aug 08 11:20:02 2011