(self, password=None)
| 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 = [] |
nothing calls this directly
no test coverage detected