'Test an archive. It should exist and the MD5 checksum should be correct.'

def _archiveOK(self):

    if (not os.path.exists(self.archiveFilename)):
        return 0
    if (not self._dict.get('MD5Sum')):
        sys.stderr.write(('Warning:    no    MD5Sum    for    %s\n' % self.fullname()))
        return 1
    data = open(self.archiveFilename, 'rb').read()
    checksum = hashlib.md5(data).hexdigest()
    return (checksum == self._dict['MD5Sum'])
