mercurial/archival.py
branchstable
changeset 45048 2c0043977b6d
parent 44577 f8427841c8fc
child 45083 3a6ec080b521
--- a/mercurial/archival.py	Wed Jul 08 08:25:30 2020 +0200
+++ b/mercurial/archival.py	Wed Jul 08 08:57:21 2020 +0200
@@ -189,7 +189,12 @@
                     name, pycompat.sysstr(mode), gzfileobj
                 )
             else:
-                return tarfile.open(name, pycompat.sysstr(mode + kind), fileobj)
+                try:
+                    return tarfile.open(
+                        name, pycompat.sysstr(mode + kind), fileobj
+                    )
+                except tarfile.CompressionError as e:
+                    raise error.Abort(pycompat.bytestr(e))
 
         if isinstance(dest, bytes):
             self.z = taropen(b'w:', name=dest)