def open_archive_entry(entry):
 arch = None
 try:
  archive_path = entry[u'location']
  arch = archive.open_archive(archive_path)
 except KeyError:
  log.error(u'Entry does not appear to represent a local file.')
 except archive.BadArchive as error:
  fail_entry_with_error(entry, (u'Bad archive: %s (%s)' % (archive_path, error)))
 except archive.NeedFirstVolume:
  log.error(u'Not the first volume: %s', archive_path)
 except archive.ArchiveError as error:
  fail_entry_with_error(entry, (u'Failed to open Archive: %s (%s)' % (archive_path, error)))
 return arch

def open_archive_entry ( entry ) : arch = None try : archive_path = entry [ u'location' ] arch = archive . open_archive ( archive_path ) except KeyError : log . error ( u'Entry does not appear to represent a local file.' ) except archive . BadArchive as error : fail_entry_with_error ( entry , ( u'Bad archive: %s (%s)' % ( archive_path , error ) ) ) except archive . NeedFirstVolume : log . error ( u'Not the first volume: %s' , archive_path ) except archive . ArchiveError as error : fail_entry_with_error ( entry , ( u'Failed to open Archive: %s (%s)' % ( archive_path , error ) ) ) return arch
convenience method for opening archives from entries .