MCPcopy
hub / github.com/mikf/gallery-dl / write_extra

Method write_extra

gallery_dl/postprocessor/zip.py:76–89  ·  view source on GitHub ↗
(self, pathfmt, zfile, files)

Source from the content-addressed store, hash-verified

74 self.write(pathfmt, zfile)
75
76 def write_extra(self, pathfmt, zfile, files):
77 for path in map(util.expand_path, files):
78 if not os.path.isabs(path):
79 path = os.path.join(pathfmt.realdirectory, path)
80 try:
81 zfile.write(path, os.path.basename(path))
82 except OSError as exc:
83 self.log.warning(
84 "Unable to write %s to %s", path, zfile.filename)
85 self.log.debug("%s: %s", exc, exc.__class__.__name__)
86 pass
87 else:
88 if self.delete:
89 util.remove_file(path)
90
91 def finalize(self, pathfmt):
92 if self.zfile:

Callers 1

writeMethod · 0.95

Calls 3

writeMethod · 0.45
warningMethod · 0.45
debugMethod · 0.45

Tested by

no test coverage detected