Fixed pylint errors in outputtree.py

This commit is contained in:
Martin Gracik 2010-12-02 13:27:08 +01:00
parent 007ed0dc76
commit 5a3ff79726

View File

@ -70,9 +70,9 @@ class LoraxOutputTree(BaseLoraxClass):
for n, kernel in enumerate(self.installtree.kernels): for n, kernel in enumerate(self.installtree.kernels):
suffix = "" suffix = ""
if kernel.type == constants.K_PAE: if kernel.ktype == constants.K_PAE:
suffix = "-PAE" suffix = "-PAE"
elif kernel.type == constants.K_XEN: elif kernel.ktype == constants.K_XEN:
suffix = "-XEN" suffix = "-XEN"
kname = "vmlinuz{0}".format(suffix) kname = "vmlinuz{0}".format(suffix)
@ -90,11 +90,11 @@ class LoraxOutputTree(BaseLoraxClass):
dst = joinpaths(self.pxebootdir, kname) dst = joinpaths(self.pxebootdir, kname)
shutil.copy2(kernel.fpath, dst) shutil.copy2(kernel.fpath, dst)
# XXX change the fname and fpath to new values # change the fname and fpath to new values
self.kernels.append(DataHolder(fname=kname, self.kernels.append(DataHolder(fname=kname,
fpath=dst, fpath=dst,
version=kernel.version, version=kernel.version,
type=kernel.type)) ktype=kernel.ktype))
def get_isolinux(self): def get_isolinux(self):
isolinuxbin = joinpaths(self.installtree.root, isolinuxbin = joinpaths(self.installtree.root,
@ -156,9 +156,9 @@ class LoraxOutputTree(BaseLoraxClass):
replace(self.isolinuxcfg, r"prompt 1", "#prompt 1") replace(self.isolinuxcfg, r"prompt 1", "#prompt 1")
elif os.path.isfile(splashtolss): elif os.path.isfile(splashtolss):
cmd = [splashtolss, syslinuxsplash, splashlss] cmd = [splashtolss, syslinuxsplash, splashlss]
p = subprocess.Popen(cmd, stdout=subprocess.PIPE) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
rc = p.wait() retcode = proc.wait()
if not rc == 0: if not retcode == 0:
logger.error("failed to create splash.lss") logger.error("failed to create splash.lss")
sys.exit(1) sys.exit(1)