python and rpm

Paul Nasrat pnasrat at redhat.com
Tue Feb 28 16:14:34 UTC 2006


On Fri, 2006-02-24 at 08:04 +0100, Tim Lauridsen wrote:
> Chitlesh GOORAH wrote:
>    
> What about something like this
> 
> for mi in ts.dbMatch ('name', 'kernel'):
>     name = mi['name']
>     if name.find('hypervisor') <> -1:
> 	# Do the stuff 

Or you could use mi.pattern
mi = ts.dbMatch()
mi.pattern("name",rpm.RPMMIRE_GLOB,"kernel*hypervisor")

Paul




More information about the fedora-devel-list mailing list