Patchwork [3,of,5] archival: drop py2.5 taropen workaround

login
register
mail settings
Submitter timeless@mozdev.org
Date Oct. 20, 2015, 12:33 a.m.
Message ID <fc33b48966cfa28f7abc.1445301195@waste.org>
Download mbox | patch
Permalink /patch/11198/
State Superseded
Headers show

Comments

timeless@mozdev.org - Oct. 20, 2015, 12:33 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1444944158 14400
#      Thu Oct 15 17:22:38 2015 -0400
# Node ID fc33b48966cfa28f7abc415cf6ba98a37bbf4e52
# Parent  30001a3db4191ec0eac6c7b3519d7c04cfc57279
archival: drop py2.5 taropen workaround

Patch

diff --git a/mercurial/archival.py b/mercurial/archival.py
--- a/mercurial/archival.py
+++ b/mercurial/archival.py
@@ -154,11 +154,7 @@ 
             else:
                 return tarfile.open(name, mode + kind, fileobj)
 
-        if isinstance(dest, str):
-            self.z = taropen(dest, mode='w:')
-        else:
-            # Python 2.5-2.5.1 have a regression that requires a name arg
-            self.z = taropen(name='', mode='w|', fileobj=dest)
+        self.z = taropen(dest, mode='w:')
 
     def addfile(self, name, mode, islink, data):
         i = tarfile.TarInfo(name)