Пример #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])
Пример #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])
Пример #3
0
 def __init__(self):
     self.errors = ErrorList()
     self.sources = DownloadReport()
Пример #4
0
 def __init__(self):
     self.errors = ErrorList()
     self.repository = {}
Пример #5
0
 def __init__(self):
     self.errors = ErrorList()
Пример #6
0
 def __init__(self):
     self.errors = ErrorList()