except:
pass
- def create(self, repomd, pkglist, optlist=[]):
+ def create(self, repomd, pkglist, optlist=()):
try:
pkgmgr = MiniBackend(self.get_rootdir())
pkgmgr.arch = self.arch
pkgmgr.repomd = repomd
- pkgmgr.optionals = optlist
- map(pkgmgr.selectPackage, pkglist + optlist)
+ pkgmgr.optionals = list(optlist)
+ map(pkgmgr.selectPackage, pkglist + list(optlist))
pkgmgr.runInstall()
except (OSError, IOError, errors.CreatorError), err:
return globalmounts
-def cleanup_chrootenv(chrootdir, bindmounts = None, globalmounts = []):
+def cleanup_chrootenv(chrootdir, bindmounts=None, globalmounts=()):
global chroot_lockfd, chroot_lock
def bind_unmount(chrootmounts):
- chrootmounts.reverse()
- for b in chrootmounts:
+ for b in reversed(chrootmounts):
msger.verbose("bind_unmount: %s -> %s" % (b.src, b.dest))
b.unmount()
superclass = ksversion.returnClassForVersion(version=using_version)
class KSHandlers(superclass):
- def __init__(self, mapping={}):
+ def __init__(self):
superclass.__init__(self, mapping=commandMap[using_version])
self.prepackages = ksparser.Packages()
self.attachment = ksparser.Packages()
return default
return ks.handler.bootloader.default
-def get_repos(ks, repo_urls = {}):
+def get_repos(ks, repo_urls=None):
repos = {}
for repo in ks.handler.repo.repoList:
inc = []
baseurl = repo.baseurl
mirrorlist = repo.mirrorlist
- if repo.name in repo_urls:
+ if repo_urls and repo.name in repo_urls:
baseurl = repo_urls[repo.name]
mirrorlist = None
except (AttributeError, kserrors.KickstartError):
pass
-def get_attachment(ks, required = []):
- return ks.handler.attachment.packageList + required
+def get_attachment(ks, required=()):
+ return ks.handler.attachment.packageList + list(required)
-def get_pre_packages(ks, required = []):
- return ks.handler.prepackages.packageList + required
+def get_pre_packages(ks, required=()):
+ return ks.handler.prepackages.packageList + list(required)
-def get_packages(ks, required = []):
- return ks.handler.packages.packageList + required
+def get_packages(ks, required=()):
+ return ks.handler.packages.packageList + list(required)
-def get_groups(ks, required = []):
- return ks.handler.packages.groupList + required
+def get_groups(ks, required=()):
+ return ks.handler.packages.groupList + list(required)
-def get_excluded(ks, required = []):
- return ks.handler.packages.excludedList + required
+def get_excluded(ks, required=()):
+ return ks.handler.packages.excludedList + list(required)
-def get_partitions(ks, required = []):
+def get_partitions(ks):
return ks.handler.partition.partitions
def ignore_missing(ks):