diff --git a/mercurial/archival.py b/mercurial/archival.py --- a/mercurial/archival.py +++ b/mercurial/archival.py @@ -168,7 +168,7 @@ return tarfile.open( name, pycompat.sysstr(mode + kind), fileobj) - if isinstance(dest, str): + if isinstance(dest, bytes): self.z = taropen('w:', name=dest) else: self.z = taropen('w|', fileobj=dest) @@ -217,7 +217,7 @@ or compressed with deflate.''' def __init__(self, dest, mtime, compress=True): - if not isinstance(dest, str): + if not isinstance(dest, bytes): try: dest.tell() except (AttributeError, IOError):