From 649e87ae5fa7331835a92ab0dba8b04cc0be1105 Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Sat, 4 Oct 2008 20:22:12 -1000 Subject: [PATCH] Use correct parameter initializers in installPackages() Init named parameters to None rather than other variables (copy and paste gets me again). --- src/pylorax/instroot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pylorax/instroot.py b/src/pylorax/instroot.py index 0089367d..46aba9d8 100644 --- a/src/pylorax/instroot.py +++ b/src/pylorax/instroot.py @@ -96,7 +96,7 @@ def createInstRoot(yumconf=None, arch=None, treedir=None, updates=None): return True # 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) 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.append("--installroot=%s" % (destdir,)) arglist.append('install')