changeset 417:f1bf8b6143b7

core: removed former save_data method
author Goffi <goffi@goffi.org>
date Tue, 01 Nov 2011 23:04:48 +0100
parents 32dc8b18c2ae
children 199cf4ebcc74
files src/tools/memory.py
diffstat 1 files changed, 1 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/tools/memory.py	Tue Nov 01 22:59:15 2011 +0100
+++ b/src/tools/memory.py	Tue Nov 01 23:04:48 2011 +0100
@@ -105,19 +105,6 @@
         with open(file, 'wb') as xml_file:
             xml_file.write(self.dom.toxml('utf-8'))
 
-    def save_data(self, file):
-        """Save parameters data to file"""
-        #TODO: save properly in a separate file/database,
-        # use different behaviour depending of the data type (e.g. password encrypted)
-        
-        #general params
-        with open(file+'_gen', 'w') as param_gen_pickle:
-            pickle.dump(self.params_gen, param_gen_pickle)
-
-        #then individual params
-        with open(file+'_ind', 'w') as param_ind_pickle:
-            pickle.dump(self.params, param_ind_pickle)
-
     def __init__(self, host, storage):
         debug("Parameters init")
         self.host = host
@@ -434,6 +421,7 @@
 
     def setParam(self, name, value, category, profile_key='@NONE@'):
         """Set a parameter, return None if the parameter is not in param xml"""
+        #TODO: use different behaviour depending of the data type (e.g. password encrypted)
         if profile_key!="@NONE@":
             profile = self.getProfileName(profile_key)
             if not profile:
@@ -590,7 +578,6 @@
                                         self.host.get_const('savefile_private'))
         
         self.params.save_xml(param_file_xml)
-        self.params.save_data(param_file_data)
         debug(_("params saved"))
         with open(history_file, 'w') as history_pickle:
             pickle.dump(self.history, history_pickle)