mailr9500 - /1.3/generic_fns/state.py


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

Header


Content

Posted by edward on September 10, 2009 - 18:36:
Author: bugman
Date: Thu Sep 10 18:36:40 2009
New Revision: 9500

URL: http://svn.gna.org/viewcvs/relax?rev=9500&view=rev
Log:
Added the pickle flag to save_state().

This defaults to True to prevent relax failures during the XML file 
implementation.


Modified:
    1.3/generic_fns/state.py

Modified: 1.3/generic_fns/state.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/state.py?rev=9500&r1=9499&r2=9500&view=diff
==============================================================================
--- 1.3/generic_fns/state.py (original)
+++ 1.3/generic_fns/state.py Thu Sep 10 18:36:40 2009
@@ -141,8 +141,7 @@
         raise RelaxError("The current data pipe is not empty.")
 
 
-
-def save_state(state=None, dir_name=None, force=False, compress_type=1):
+def save_state(state=None, dir_name=None, compress_type=1, force=False, 
pickle=True):
     """Function for saving the program state.
 
     @keyword state:         The saved state file.
@@ -161,7 +160,8 @@
     file = open_write_file(file_name=state, dir=dir_name, force=force, 
compress_type=compress_type)
 
     # Pickle the data class and write it to file
-    dump(ds, file, 1)
+    if pickle:
+        dump(ds, file, 1)
 
     # Close the file.
     file.close()




Related Messages


Powered by MHonArc, Updated Thu Sep 10 19:20:04 2009