Beispiel #1
0
 def make(self):
     """
     Start operations to retrieve data from the data file and make the new
     hosts file for the current operating system.
     """
     RetrieveData.connect_db()
     self.make_time = time.time()
     self.write_head()
     self.write_info()
     self.get_hosts(self.make_cfg)
     self.hosts_file.close()
     RetrieveData.disconnect_db()
Beispiel #2
0
 def make(self):
     """
     Start operations to retrieve data from the data file and make the new
     hosts file for the current operating system.
     """
     RetrieveData.connect_db()
     self.make_time = time.time()
     self.write_head()
     self.write_info()
     self.get_hosts(self.make_cfg)
     self.hosts_file.close()
     RetrieveData.disconnect_db()
Beispiel #3
0
 def init_main(self):
     # Set mirrors
     self.mirrors = Utilities.set_network("network.conf")
     self.set_platform()
     # Read data file and set function list
     try:
         RetrieveData.unpack()
         RetrieveData.connect_db()
         self.set_func_list()
         self.set_info()
     except IOError:
         pass
     except BadZipfile:
         pass
     # Check if current session have root privileges
     self.check_root()