archival: drop self.filename - deprecated in py2.6
authortimeless@mozdev.org
Fri, 04 Sep 2015 05:54:35 -0400
changeset 26198 1a781a986611
parent 26197 fb6c08a9b40a
child 26199 5411059d93f8
archival: drop self.filename - deprecated in py2.6
mercurial/archival.py
--- 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