How to check if linux host is up-to-date with python yum module
Question: The yum commandline tool has an option to check if a host is up-to-date or if
there are any (security-) updates available.

    
    
    $ yum check-update
    

Python has a "yum" Module - it offers functions like:

    
    
    import yum
    yb = yum.YumBase()
    if yb.rpmdb.searchNevra(name='httpd'):
       print "httpd installed"
    

But I didn't find any documentation / function to check if updates are
available with the python module (like "yum check-updates" on the command
line).

Does anyone know how to do this using the yum python module (not calling the
commandline tool and scraping the output).


Answer: After debugging the commandline (python) scripts I found a solution how to
check for updates ... see [here](http://slash4.net/blog/python/python-yum-
check-update-howto.html)

