MD5 digest problem
Tsai Li Ming <[email protected]> Mon, 06 Jun 2005 21:00:57 +0800
| Newsgroups | gmane.linux.redhat.rpm.python |
|---|---|
| Message-ID | <[email protected]> |
Hi seth,
Is there a way to suppress such an error message from the rpm module:
error: rpmts_HdrFromFdno: MD5 digest: BAD
Expected(40b52df6c81090297c0f10ebfb8d7668) !=
(1213e5cd891b963fcc9e907bed89212b)
error reading package header
try:
fd = os.open(self.filename, os.O_RDONLY)
ts = rpm.ts()
ts.setVSFlags(rpm.RPMVSF_NORSA | rpm.RPMVSF_NODSA)
self.hdr = ts.hdrFromFdno(fd)
except Exception,e:
print e
Liming