Esempio n. 1
0
 def read_and_set_config(self):
     one_from_config = False
     try:
         data = Config(["res/config/coverage.yml"]).data['CoverageConfig']
         for k, v in data.iteritems():
             self.__setattr__(k, v)
             one_from_config = True
         self.using_default_config = False
         self.config_time = get_current_ntp_time()
     except Exception as ex:
         if one_from_config:
             log.info("Load from config failed with '%s'.  Using hybrid default/config file configuration" % ex.message)
             return False
         else:
             log.info("load from config failed with '%s'.  Using default config" % ex.message)
     return True