mercurial/archival.py
branchstable
changeset 44475 b7ca03dff14c
parent 44474 a23b859ad17d
child 44577 f8427841c8fc
--- a/mercurial/archival.py	Tue Mar 10 18:53:19 2020 +0100
+++ b/mercurial/archival.py	Tue Mar 10 18:54:44 2020 +0100
@@ -135,7 +135,9 @@
     '''write archive to tar file or stream.  can write uncompressed,
     or compress with gzip or bzip2.'''
 
-    if True:
+    if pycompat.ispy3:
+        GzipFileWithTime = gzip.GzipFile  # camelcase-required
+    else:
 
         class GzipFileWithTime(gzip.GzipFile):
             def __init__(self, *args, **kw):