Beispiel #1
0
 def load_actual_information(self):
     """
     Information path contains best accuracy to compare before save.
     """
     # TODO (@gabvaztor) DOCs
     configuration = None
     folders.create_directory_from_fullpath(self.information_path)
     folders.create_file_from_fullpath(self.information_path)
     if os.stat(self.information_path).st_size != 0:
         with open(self.information_path) as json_configuration:
             dict = json.load(json_configuration)
             configuration = Configuration(dict)
     return configuration
Beispiel #2
0
 def load_actual_configuration(self):
     """
     :return: configuration
     """
     # TODO (@gabvaztor) DOCS
     configuration = None
     folders.create_directory_from_fullpath(self.configuration_path)
     folders.create_file_from_fullpath(self.configuration_path)
     try:
         if os.stat(self.configuration_path).st_size != 0:
             with open(self.configuration_path) as json_configuration:
                 dict = json.load(json_configuration)
                 configuration = Configuration(dict)
     except Exception:
         input(
             "Configuration problem: There is not a Configuration json file or this has nothing. Press Ok to"
             "continue the execution and the file will be created automatically or stop the program and create for"
             "your own")
     return configuration