def _unpack_tarfile(filename, extract_dir):
 try:
  tarobj = tarfile.open(filename)
 except tarfile.TarError:
  raise ReadError(('%s is not a compressed or uncompressed tar file' % filename))
 try:
  tarobj.extractall(extract_dir)
 finally:
  tarobj.close()

def _unpack_tarfile ( filename , extract_dir ) : try : tarobj = tarfile . open ( filename ) except tarfile . TarError : raise ReadError ( ( '%s is not a compressed or uncompressed tar file' % filename ) ) try : tarobj . extractall ( extract_dir ) finally : tarobj . close ( )
unpack tar/tar .