20parser.add_option("","--algorithm",help=_("the hash function to use"),metavar="HASH")21parser.add_option("-m","--manifest",help=_("print the manifest"),action='store_true')22parser.add_option("-d","--digest",help=_("print the digest"),action='store_true')
5152ifos.path.isdir(source):53ifextractisnotNone:54raiseSafeException("Can't use extract with a directory")55do_manifest(source)56else:57data=None58tmpdir=tempfile.mkdtemp()59try:60data=open(args[0],'rb')61unpack.unpack_archive(source,data,tmpdir,extract)62do_manifest(tmpdir)63finally:64support.ro_rmtree(tmpdir)65ifdata:66data.close()67