python and rpm

Tim Lauridsen tla-ml at rasmil.dk
Fri Feb 24 07:04:32 UTC 2006


Chitlesh GOORAH wrote:
> hai there
> i got a question related with rpm
>
> for mi in ts.dbMatch ('name', 'kernel'):
>
> it searches for kernel
> good. now I want it to search for 'hypervisor' ?
>
> it is not a 'release'
>
> how should i proceed?
>
> --
> http://clunixchit.blogspot.com
>
>   
What about something like this

for mi in ts.dbMatch ('name', 'kernel'):
    name = mi['name']
    if name.find('hypervisor') <> -1:
	# Do the stuff 

  
Tim Lauridsen




More information about the fedora-devel-list mailing list