perceval/archive.py
def _verify_archive(self):
        """Check whether the archive is valid or not.

        This method will check if tables were created and if they
        contain valid data.
        """
        nentries = self._count_table_rows(self.ARCHIVE_TABLE)
        nmetadata = self._count_table_rows(self.METADATA_TABLE)

        if nmetadata > 1:
            msg = "archive %s metadata corrupted; multiple metadata entries" % (self.archive_path)
            raise ArchiveError(cause=msg)
        if nmetadata == 0 and nentries > 0:
            msg = "archive %s metadata is empty but %s entries were achived" % (self.archive_path)
            raise ArchiveError(cause=msg)

        logger.debug("Integrity of archive %s OK; entries: %s rows, metadata: %s rows",
                     self.archive_path, nentries, nmetadata)
def _verify_archive(self):
        nentries = self._count_table_rows(self.ARCHIVE_TABLE)
        nmetadata = self._count_table_rows(self.METADATA_TABLE)

        if nmetadata > 1:
            msg = "archive %s metadata corrupted; multiple metadata entries" % (self.archive_path)
            raise ArchiveError(cause=msg)
        if nmetadata == 0 and nentries > 0:
            msg = "archive %s metadata is empty but %s entries were achived" % (self.archive_path)
            raise ArchiveError(cause=msg)

        logger.debug("Integrity of archive %s OK; entries: %s rows, metadata: %s rows",
                     self.archive_path, nentries, nmetadata)
def _verify_archive ( self ) : nentries = self . _count_table_rows ( self . ARCHIVE_TABLE ) nmetadata = self . _count_table_rows ( self . METADATA_TABLE ) if nmetadata > 1 : msg = "archive %s metadata corrupted; multiple metadata entries" % ( self . archive_path ) raise ArchiveError ( cause = msg ) if nmetadata == 0 and nentries > 0 : msg = "archive %s metadata is empty but %s entries were achived" % ( self . archive_path ) raise ArchiveError ( cause = msg ) logger . debug ( "Integrity of archive %s OK; entries: %s rows, metadata: %s rows" , self . archive_path , nentries , nmetadata )
Check whether the archive is valid or not.

        This method will check if tables were created and if they
        contain valid data.
Check whether the archive is valid or not .