MCPcopy Index your code
hub / github.com/pyload/pyload / list

Method list

module/plugins/internal/SevenZip.py:139–158  ·  view source on GitHub ↗
(self, password=None)

Source from the content-addressed store, hash-verified

137 return files
138
139 def list(self, password=None):
140 p = self.call_cmd("l", self.filename, password=password)
141 out, err = (_r.strip() if _r else "" for _r in p.communicate())
142
143 if any([_e in err for _e in ("Can not open", "cannot find the file")]):
144 raise ArchiveError(_("Cannot open file"))
145
146 if p.returncode > 1:
147 raise ArchiveError(_("Process return code: %d") % p.returncode)
148
149 files = set()
150 for groups in self._RE_FILES.findall(out):
151 f = groups[-1].strip()
152 if not self.fullpath:
153 f = os.path.basename(f)
154 files.add(fsjoin(self.dest, f))
155
156 self.files = list(files)
157
158 return self.files
159
160 def call_cmd(self, command, *xargs, **kwargs):
161 args = []

Callers

nothing calls this directly

Calls 6

call_cmdMethod · 0.95
ArchiveErrorClass · 0.85
fsjoinFunction · 0.85
communicateMethod · 0.80
_Function · 0.50
addMethod · 0.45

Tested by

no test coverage detected