mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-20 03:50:08 +00:00
scripts: waifulib: fix zipfile init for older Python
This commit is contained in:
parent
f141869ce3
commit
b56f6fa330
@ -19,10 +19,7 @@ class ziparchive(Task.Task):
|
|||||||
outfile = self.outputs[0].path_from(self.outputs[0].ctx.launch_node())
|
outfile = self.outputs[0].path_from(self.outputs[0].ctx.launch_node())
|
||||||
comp = zipfile.ZIP_STORED if self.compresslevel == 0 else zipfile.ZIP_DEFLATED
|
comp = zipfile.ZIP_STORED if self.compresslevel == 0 else zipfile.ZIP_DEFLATED
|
||||||
|
|
||||||
with zipfile.ZipFile(outfile, mode='w',
|
with zipfile.ZipFile(outfile, mode='w', compression=comp) as zf:
|
||||||
compression=comp, compresslevel=self.compresslevel,
|
|
||||||
strict_timestamps=False) as zf:
|
|
||||||
|
|
||||||
for src in self.inputs:
|
for src in self.inputs:
|
||||||
infile = src.path_from(src.ctx.launch_node())
|
infile = src.path_from(src.ctx.launch_node())
|
||||||
arcfile = src.path_from(self.relative_to)
|
arcfile = src.path_from(self.relative_to)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user