def __init__(self, conf):
     """conf is preupg.conf.Conf object, contains configuration"""
     self.conf = conf
     self.content = ""
     self.result_file = ""
     self.xml_mgr = None
     self.basename = ""
     self.scanning_progress = None
     self.report_parser = None
     self.report_data = {}
     self.text_convertor = ""
     self.common = None
     self._devel_mode = 0
     self._dist_mode = None
     self.report_return_value = 0
     self.report_log_file = None
     self.debug_log_file = None
     settings.profile = self.conf.profile
     if self.conf.debug is None:
         LoggerHelper.add_stream_handler(logger, logging.INFO)
     else:
         LoggerHelper.add_stream_handler(logger, logging.DEBUG)
     self.openscap_helper = None
     self._add_report_log_file()
     self._add_debug_log_file()
     self.tar_ball_name = None
     self.third_party = ""
     self.assessment_dir = None
     self.list_scans = []
예제 #2
0
 def __init__(self, conf):
     """conf is preupg.conf.Conf object, contains configuration"""
     self.conf = conf
     self.all_xccdf_xml_path = ""
     self.all_xccdf_xml_copy_path = ""
     self.module_set_dirname = ""
     self.module_set_path = ""
     self.module_set_copy_path = ""
     self.result_file = ""
     self.xml_mgr = None
     self.scanning_progress = None
     self.report_parser = None
     self.text_convertor = ""
     self.common = None
     self._devel_mode = 0
     self._dist_mode = None
     self.report_log_file = None
     self.debug_log_file = None
     settings.profile = self.conf.profile
     if self.conf.debug is None:
         LoggerHelper.add_stream_handler(logger, logging.INFO)
     else:
         LoggerHelper.add_stream_handler(logger, logging.DEBUG)
     self.openscap_helper = None
     self._add_report_log_file()
     self._add_debug_log_file()
     self.tar_ball_name = None
     self._set_old_report_style()
 def __init__(self, conf):
     """conf is preupg.conf.Conf object, contains configuration"""
     self.conf = conf
     self.all_xccdf_xml_path = ""
     self.all_xccdf_xml_copy_path = ""
     self.module_set_dirname = ""
     self.module_set_path = ""
     self.module_set_copy_path = ""
     self.result_file = ""
     self.xml_mgr = None
     self.scanning_progress = None
     self.report_parser = None
     self.text_convertor = ""
     self.common = None
     self._devel_mode = 0
     self._dist_mode = None
     self.report_log_file = None
     self.debug_log_file = None
     settings.profile = self.conf.profile
     if self.conf.debug is None:
         LoggerHelper.add_stream_handler(logger, logging.INFO)
     else:
         LoggerHelper.add_stream_handler(logger, logging.DEBUG)
     self.openscap_helper = None
     self._add_report_log_file()
     self._add_debug_log_file()
     self.tar_ball_name = None
     self._set_old_report_style()
예제 #4
0
 def __init__(self, conf):
     """conf is preupg.conf.Conf object, contains configuration"""
     self.conf = conf
     self.content = ""
     self.result_file = ""
     self.xml_mgr = None
     self.basename = ""
     self.scanning_progress = None
     self.report_parser = None
     self.report_data = {}
     self.text_convertor = ""
     self.common = None
     self._devel_mode = 0
     self._dist_mode = None
     self.report_return_value = 0
     self.report_log_file = None
     self.debug_log_file = None
     settings.profile = self.conf.profile
     if self.conf.debug is None:
         LoggerHelper.add_stream_handler(logger, logging.INFO)
     else:
         LoggerHelper.add_stream_handler(logger, logging.DEBUG)
     self.openscap_helper = None
     self._add_report_log_file()
     self._add_debug_log_file()
     self.tar_ball_name = None
     self.third_party = ""
     self.assessment_dir = None
     self.list_scans = []
 def __init__(self, conf):
     """conf is preupg.conf.Conf object, contains configuration"""
     self.conf = conf
     if self.conf.debug is None:
         LoggerHelper.add_stream_handler(logger, logging.INFO)
     else:
         LoggerHelper.add_stream_handler(logger, logging.DEBUG)
     self.ui_helper = UIHelper(self.conf.maindir)
 def __init__(self, conf):
     """conf is preupg.conf.Conf object, contains configuration"""
     self.conf = conf
     if self.conf.debug is None:
         LoggerHelper.add_stream_handler(logger, logging.INFO)
     else:
         LoggerHelper.add_stream_handler(logger, logging.DEBUG)
     self.ui_helper = UIHelper(self.conf.maindir)
 def _add_debug_log_file(self):
     """
     Add the special report log file
     :return:
     """
     try:
         LoggerHelper.add_file_handler(logger_debug,
                                       settings.preupg_log,
                                       formatter=logging.Formatter("%(asctime)s %(levelname)s\t%(filename)s"
                                                         ":%(lineno)s %(funcName)s: %(message)s"),
                                       level=logging.DEBUG)
     except (IOError, OSError):
         logger.warning("Can not create debug log '%s'", settings.preupg_log)
     else:
         self.debug_log_file = settings.preupg_log
예제 #8
0
 def _add_debug_log_file(self):
     """
     Add the special report log file
     :return:
     """
     try:
         LoggerHelper.add_file_handler(
             logger_debug,
             settings.preupg_log,
             formatter=logging.Formatter(
                 "%(asctime)s %(levelname)s\t%(filename)s"
                 ":%(lineno)s %(funcName)s: %(message)s"),
             level=logging.DEBUG)
     except (IOError, OSError):
         logger.warning("Can not create debug log '%s'",
                        settings.preupg_log)
     else:
         self.debug_log_file = settings.preupg_log