mercurial/archival.py
changeset 48012 406a7e629946
parent 45942 89a2afe31e82
child 48875 6000f5b25c9b
--- a/mercurial/archival.py	Mon Sep 20 10:59:26 2021 -0400
+++ b/mercurial/archival.py	Mon Sep 20 11:03:46 2021 -0400
@@ -29,6 +29,8 @@
     vfs as vfsmod,
 )
 
+from .utils import stringutil
+
 stringio = util.stringio
 
 # from unzip source code:
@@ -196,7 +198,7 @@
                         name, pycompat.sysstr(mode + kind), fileobj
                     )
                 except tarfile.CompressionError as e:
-                    raise error.Abort(pycompat.bytestr(e))
+                    raise error.Abort(stringutil.forcebytestr(e))
 
         if isinstance(dest, bytes):
             self.z = taropen(b'w:', name=dest)