コード例 #1
0
 def _check_license_csv_and_reidentify(self):
     old_md5 = self._license_csv_md5
     new_md5 = licensemanager.get_customer_license_csv_md5()
     _log.info('license csv hash %s -> %s' % (old_md5, new_md5))
     if old_md5 != new_md5:
         _log.info('license csv changed, reread and reidentify')
         self._license_csv_md5 = new_md5
         licensemanager.force_customer_license_reread()
         self._force_reidentify()
コード例 #2
0
 def __init__(self, config_parser):
     # config parsing
     parser = config_parser
     self.immediate_update = parser.getboolean('misc', 'immediateupdate')
     tmp = parser.get('misc', 'beta_servers')
     self.beta_servers = []
     for i in tmp.split(','):
         i = i.strip()
         if i == '':
             continue
         self.beta_servers.append(i)
     
     # rest of the initialization
     self.connections = []
     self.stable_aptsource = self._aptsource(parser.get('misc', 'stable_version'))
     self.unstable_aptsource = self._aptsource(parser.get('misc', 'unstable_version'))
     self._aptcache = aptsupport.get_aptcache()
     self._current_version, _ = self._aptcache.get_apt_info(self.stable_aptsource)
     self._master_check_call = None
     self._master_check_interval = msconstants.MASTER_CHECK_INTERVAL
     self._master_check_full_count = 0
     self._license_csv_md5 = licensemanager.get_customer_license_csv_md5()