1

python with yum api - installing package [migrated]

view story
linux-howto

http://serverfault.com – Hello i'm using the following code to install package through yum api , using pythongs cript i need to build some installation based on this code , now its installed but im getting some errors #!/usr/bin/python import sys import platform import urllib2, urllib import re import yum package="ntp" print ("Installing ntp") print ("#################") yb=yum.YumBase() searchlist=['name'] arg=['ntp'] matches = yb.searchGenerator(searchlist,arg) for (package, matched_value) in matches : if package.name == 'ntp' : yb.install(package) yb.buildTransaction() yb.processTransaction() er (HowTos)