Exemplo n.º 1
0
 def load(self, fileName):
     """Create a Settings object by loading a file.
 @param fileName:  what file to load the settings from.
 @type  fileName:  file
 @returns:  True if file loaded properly, False otherwise"""
     # check that the file exists
     if not os.path.exists(fileName) or not os.path.isfile(fileName):
         log_msg("Could not load settings file because it does not exist:  %s" % (fileName), 1)
         return False
     SettingsFile.unpickle(self, fileName)
     return True
Exemplo n.º 2
0
 def load(self, fileName):
     """Create a Settings object by loading a file.
 @param fileName:  what file to load the settings from.
 @type  fileName:  file
 @returns:  True if file loaded properly, False otherwise"""
     #check that the file exists
     if not os.path.exists(fileName) or not os.path.isfile(fileName):
         log_msg(
             "Could not load settings file because it does not exist:  %s" %
             (fileName), 1)
         return False
     SettingsFile.unpickle(self, fileName)
     return True