Show More
@@ -154,9 +154,11 b' class tarit(object):' | |||||
154 | fname = fname[:-3] |
|
154 | fname = fname[:-3] | |
155 | flags = 0 |
|
155 | flags = 0 | |
156 | if fname: |
|
156 | if fname: | |
157 | flags = gzip.FNAME |
|
157 | flags = gzip.FNAME # pytype: disable=module-attr | |
158 | self.fileobj.write(pycompat.bytechr(flags)) |
|
158 | self.fileobj.write(pycompat.bytechr(flags)) | |
159 | gzip.write32u(self.fileobj, int(self.timestamp)) |
|
159 | gzip.write32u( # pytype: disable=module-attr | |
|
160 | self.fileobj, int(self.timestamp) | |||
|
161 | ) | |||
160 | self.fileobj.write(b'\002') |
|
162 | self.fileobj.write(b'\002') | |
161 | self.fileobj.write(b'\377') |
|
163 | self.fileobj.write(b'\377') | |
162 | if fname: |
|
164 | if fname: | |
@@ -179,7 +181,7 b' class tarit(object):' | |||||
179 | timestamp=mtime, |
|
181 | timestamp=mtime, | |
180 | ) |
|
182 | ) | |
181 | self.fileobj = gzfileobj |
|
183 | self.fileobj = gzfileobj | |
182 | return tarfile.TarFile.taropen( |
|
184 | return tarfile.TarFile.taropen( # pytype: disable=attribute-error | |
183 | name, pycompat.sysstr(mode), gzfileobj |
|
185 | name, pycompat.sysstr(mode), gzfileobj | |
184 | ) |
|
186 | ) | |
185 | else: |
|
187 | else: | |
@@ -234,7 +236,7 b' class zipit(object):' | |||||
234 |
|
236 | |||
235 | def addfile(self, name, mode, islink, data): |
|
237 | def addfile(self, name, mode, islink, data): | |
236 | i = zipfile.ZipInfo(pycompat.fsdecode(name), self.date_time) |
|
238 | i = zipfile.ZipInfo(pycompat.fsdecode(name), self.date_time) | |
237 | i.compress_type = self.z.compression |
|
239 | i.compress_type = self.z.compression # pytype: disable=attribute-error | |
238 | # unzip will not honor unix file modes unless file creator is |
|
240 | # unzip will not honor unix file modes unless file creator is | |
239 | # set to unix (id 3). |
|
241 | # set to unix (id 3). | |
240 | i.create_system = 3 |
|
242 | i.create_system = 3 |
General Comments 0
You need to be logged in to leave comments.
Login now