core: removed former save_data method
This commit is contained in:
parent
fa6d27efb4
commit
be79efe07c
1 changed files with 1 additions and 14 deletions
|
|
@ -105,19 +105,6 @@ class Param():
|
|||
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 @@ class Param():
|
|||
|
||||
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 @@ class Memory:
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue