def is_tarfile(name):
try:<EOL><INDENT>t = open(name)<EOL>t.close()<EOL>return True<EOL><DEDENT>except TarError:<EOL><INDENT>return False<EOL><DEDENT>
Return True if name points to a tar archive that we
       are able to handle, else return False.