Re: MD5 digest problem

Tsai Li Ming <[email protected]> Mon, 06 Jun 2005 21:21:06 +0800
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <[email protected]>
seth vidal wrote:
> On Mon, 2005-06-06 at 21:00 +0800, Tsai Li Ming wrote:
> 
>>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
>>
> 
> 
> dup stdout and stderr and grab the output?
> 
> -sv

Well, I could do that. I thought there were ways to turn off such stderr 
outputs in ts

Thanks,
Liming