Use correct parameter initializers in installPackages()
Init named parameters to None rather than other variables (copy and paste gets me again).
This commit is contained in:
parent
6c6a55154a
commit
649e87ae5f
@ -96,7 +96,7 @@ def createInstRoot(yumconf=None, arch=None, treedir=None, updates=None):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
# Call yummain to install the list of packages to destdir
|
# Call yummain to install the list of packages to destdir
|
||||||
def installPackages(yumconf=yumconf, destdir=destdir, packages=packages):
|
def installPackages(yumconf=None, destdir=None, packages=None):
|
||||||
"""installPackages(yumconf=yumconf, destdir=destdir, packages=packages)
|
"""installPackages(yumconf=yumconf, destdir=destdir, packages=packages)
|
||||||
|
|
||||||
Call yummain to install the list of packages. All parameters are
|
Call yummain to install the list of packages. All parameters are
|
||||||
@ -111,6 +111,9 @@ def installPackages(yumconf=yumconf, destdir=destdir, packages=packages):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if yumconf is None or destdir is None or packages is None or packages == []:
|
||||||
|
return False
|
||||||
|
|
||||||
arglist = ['-c', yumconf, '-y']
|
arglist = ['-c', yumconf, '-y']
|
||||||
arglist.append("--installroot=%s" % (destdir,))
|
arglist.append("--installroot=%s" % (destdir,))
|
||||||
arglist.append('install')
|
arglist.append('install')
|
||||||
|
Loading…
Reference in New Issue
Block a user