Ejemplo n.º 1
0
class SummaryReport(object):
    """
    A report that provides both summary and details regarding the importing
    of content units associated with a repository.
    :ivar errors: List of errors.
    :type errors: ErrorList
    """
    def __init__(self):
        self.errors = ErrorList()

    def update(self, **details):
        self.errors.update(**details)

    def dict(self):
        """
        Get a dictionary representation.
        """
        return dict(errors=[e.dict() for e in self.errors])
Ejemplo n.º 2
0
class SummaryReport(object):
    """
    A report that provides both summary and details regarding the importing
    of content units associated with a repository.
    :ivar errors: List of errors.
    :type errors: ErrorList
    """

    def __init__(self):
        self.errors = ErrorList()

    def update(self, **details):
        self.errors.update(**details)

    def dict(self):
        """
        Get a dictionary representation.
        """
        return dict(errors=[e.dict() for e in self.errors])
Ejemplo n.º 3
0
 def __init__(self):
     self.errors = ErrorList()
     self.sources = DownloadReport()
Ejemplo n.º 4
0
 def __init__(self):
     self.errors = ErrorList()
     self.repository = {}
Ejemplo n.º 5
0
 def __init__(self):
     self.errors = ErrorList()
Ejemplo n.º 6
0
 def __init__(self):
     self.errors = ErrorList()