memory, jp: added jp commands to load/save parameters template
This commit is contained in:
parent
675921a7d7
commit
2e6420fb49
1 changed files with 115 additions and 6 deletions
|
|
@ -207,8 +207,12 @@ class Memory(object):
|
|||
return value
|
||||
|
||||
def load_xml(self, filename):
|
||||
"""Load parameters template from xml file"""
|
||||
if filename is None:
|
||||
"""Load parameters template from xml file
|
||||
|
||||
@param filename (str): input file
|
||||
@return bool: True in case of success
|
||||
"""
|
||||
if not filename:
|
||||
return False
|
||||
filename = os.path.expanduser(filename)
|
||||
if os.path.exists(filename):
|
||||
|
|
@ -246,9 +250,13 @@ class Memory(object):
|
|||
except KeyError:
|
||||
log.error(_("Trying to purge roster status cache for a profile not in memory: [%s]") % profile)
|
||||
|
||||
def save_xml(self, filename=None):
|
||||
"""Save parameters template to xml file"""
|
||||
if filename is None:
|
||||
def save_xml(self, filename):
|
||||
"""Save parameters template to xml file
|
||||
|
||||
@param filename (str): output file
|
||||
@return bool: True in case of success
|
||||
"""
|
||||
if not filename:
|
||||
return False
|
||||
#TODO: need to encrypt files (at least passwords !) and set permissions
|
||||
filename = os.path.expanduser(filename)
|
||||
|
|
|
|||
Loading…
Reference in a new issue