예제 #1
0
 def _metadata_section(self):
     metadata_report = {
         'state' : self.metadata_state,
         'execution_time' : self.metadata_execution_time,
         'error_message' : self.metadata_error_message,
         'error' : reporting.format_exception(self.metadata_exception),
         'traceback' : reporting.format_traceback(self.metadata_traceback),
         }
     return metadata_report
예제 #2
0
 def add_failed_package(self, package, exception, traceback):
     """
     Updates the progress report that a package failed to be imported.
     """
     self.packages_error_count += 1
     self.packages_individual_errors = self.packages_individual_errors or {}
     self.packages_individual_errors[package.key()] = {
         'exception' : reporting.format_exception(exception),
         'traceback' : reporting.format_traceback(traceback),
     }
예제 #3
0
 def _metadata_section(self):
     metadata_report = {
         'state' : self.metadata_state,
         'execution_time' : self.metadata_execution_time,
         'current_query' : self.metadata_current_query,
         'query_finished_count' : self.metadata_query_finished_count,
         'query_total_count' : self.metadata_query_total_count,
         'error_message' : self.metadata_error_message,
         'error' : reporting.format_exception(self.metadata_exception),
         'traceback' : reporting.format_traceback(self.metadata_traceback),
     }
     return metadata_report
예제 #4
0
    def add_failed_package(self, unit, traceback):
        """
        Updates the progress report that a package failed to be built to the
        repository.

        :param unit: Pulp representation of the package
        :type  unit: pulp.plugins.model.AssociatedUnit
        """
        self.packages_error_count += 1
        self.packages_individual_errors = self.packages_individual_errors or {}
        error_key = '%s-%s-%s' % (unit.unit_key['name'], unit.unit_key['version'], unit.unit_key['author'])
        self.packages_individual_errors[error_key] = reporting.format_traceback(traceback)
예제 #5
0
 def _packages_section(self):
     packages_report = {
         'state' : self.packages_state,
         'execution_time' : self.packages_execution_time,
         'total_count' : self.packages_total_count,
         'finished_count' : self.packages_finished_count,
         'error_count' : self.packages_error_count,
         'individual_errors' : self.packages_individual_errors,
         'error_message' : self.packages_error_message,
         'error' : reporting.format_exception(self.packages_exception),
         'traceback' : reporting.format_traceback(self.packages_traceback),
     }
     return packages_report