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

Method verify

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

Source from the content-addressed store, hash-verified

60 return True if cls._RE_PART.search(filename) else False
61
62 def verify(self, password=None):
63 #: 7z can't distinguish crc and pw error in test
64 p = self.call_cmd("l", "-slt", self.filename)
65 out, err = (_r.strip() if _r else "" for _r in p.communicate())
66
67 if self._RE_BADPWD.search(out):
68 raise PasswordError
69
70 elif self._RE_BADPWD.search(err):
71 raise PasswordError
72
73 elif self._RE_BADCRC.search(out):
74 raise CRCError(_("Header protected"))
75
76 elif self._RE_BADCRC.search(err):
77 raise CRCError(err)
78
79 def progress(self, process):
80 s = ""

Callers

nothing calls this directly

Calls 5

call_cmdMethod · 0.95
CRCErrorClass · 0.85
communicateMethod · 0.80
_Function · 0.50
searchMethod · 0.45

Tested by

no test coverage detected