changeset 26198:1a781a986611

archival: drop self.filename - deprecated in py2.6
author timeless@mozdev.org
date Fri, 04 Sep 2015 05:54:35 -0400
parents fb6c08a9b40a
children 5411059d93f8
files mercurial/archival.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/archival.py	Sun Aug 30 17:50:55 2015 -0400
+++ b/mercurial/archival.py	Fri Sep 04 05:54:35 2015 -0400
@@ -124,11 +124,7 @@
         def _write_gzip_header(self):
             self.fileobj.write('\037\213')             # magic header
             self.fileobj.write('\010')                 # compression method
-            # Python 2.6 introduced self.name and deprecated self.filename
-            try:
-                fname = self.name
-            except AttributeError:
-                fname = self.filename
+            fname = self.name
             if fname and fname.endswith('.gz'):
                 fname = fname[:-3]
             flags = 0