equal
deleted
inserted
replaced
187 self.fileobj = gzfileobj |
187 self.fileobj = gzfileobj |
188 return tarfile.TarFile.taropen( # pytype: disable=attribute-error |
188 return tarfile.TarFile.taropen( # pytype: disable=attribute-error |
189 name, pycompat.sysstr(mode), gzfileobj |
189 name, pycompat.sysstr(mode), gzfileobj |
190 ) |
190 ) |
191 else: |
191 else: |
192 return tarfile.open(name, pycompat.sysstr(mode + kind), fileobj) |
192 try: |
|
193 return tarfile.open( |
|
194 name, pycompat.sysstr(mode + kind), fileobj |
|
195 ) |
|
196 except tarfile.CompressionError as e: |
|
197 raise error.Abort(pycompat.bytestr(e)) |
193 |
198 |
194 if isinstance(dest, bytes): |
199 if isinstance(dest, bytes): |
195 self.z = taropen(b'w:', name=dest) |
200 self.z = taropen(b'w:', name=dest) |
196 else: |
201 else: |
197 self.z = taropen(b'w|', fileobj=dest) |
202 self.z = taropen(b'w|', fileobj=dest) |