changeset 36732:7f9a6f5f7612

archival: our filenames are bytes, not strs Differential Revision: https://phab.mercurial-scm.org/D2656
author Augie Fackler <augie@google.com>
date Sun, 04 Mar 2018 12:08:53 -0500
parents abf252a1c938
children f3591e687202
files mercurial/archival.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/archival.py	Sun Mar 04 12:08:37 2018 -0500
+++ b/mercurial/archival.py	Sun Mar 04 12:08:53 2018 -0500
@@ -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):