From: Thierry Parmentelat Date: Wed, 24 Jun 2015 12:59:08 +0000 (+0200) Subject: small cosmetic changes X-Git-Tag: bootmanager-5.3-1~11 X-Git-Url: http://git.onelab.eu/?p=bootmanager.git;a=commitdiff_plain;h=099b149838e51d6b04bb73073738bf1e4a5e67ad small cosmetic changes --- diff --git a/source/steps/CheckForNewDisks.py b/source/steps/CheckForNewDisks.py index 480db27..60ae952 100644 --- a/source/steps/CheckForNewDisks.py +++ b/source/steps/CheckForNewDisks.py @@ -60,7 +60,7 @@ def Run(vars, log): for device in all_devices.keys(): - (major,minor,blocks,gb_size,readonly) = all_devices[device] + (major, minor, blocks, gb_size, readonly) = all_devices[device] if device[:14] == "/dev/planetlab": log.write("Skipping device {} in volume group.\n".format(device)) diff --git a/source/steps/InstallBootstrapFS.py b/source/steps/InstallBootstrapFS.py index 8875394..24ea4bf 100644 --- a/source/steps/InstallBootstrapFS.py +++ b/source/steps/InstallBootstrapFS.py @@ -257,6 +257,7 @@ def CleanupSysimgBeforeUpgrade(sysimg, target_nodefamily, log): if line.startswith(prefix): installed_nodefamily = line.replace(prefix,"").strip() installed_pldistro, installed_fcdistro, installed_arch = installed_nodefamily.split('-') + # do not break here, bm-install is additive, we want the last one.. with open("{}/etc/planetlab/virt".format(sysimg)) as infile: installed_virt = infile.read().strip() except Exception as e: diff --git a/source/steps/InstallWriteConfig.py b/source/steps/InstallWriteConfig.py index 98167f9..9cc7f4e 100644 --- a/source/steps/InstallWriteConfig.py +++ b/source/steps/InstallWriteConfig.py @@ -123,7 +123,7 @@ def Run(vars, log): if method == "dhcp": utils.sysexec("cp /etc/resolv.conf {}/etc/".format(SYSIMG_PATH), log) - log.write("Writing node install version\n") + log.write("Writing node install_version\n") utils.makedirs("{}/etc/planetlab".format(SYSIMG_PATH)) ver = file("{}/etc/planetlab/install_version".format(SYSIMG_PATH), "w") ver.write("{}\n".format(VERSION)) diff --git a/source/steps/ValidateNodeInstall.py b/source/steps/ValidateNodeInstall.py index a39ee30..529400d 100644 --- a/source/steps/ValidateNodeInstall.py +++ b/source/steps/ValidateNodeInstall.py @@ -77,8 +77,7 @@ def Run(vars, log): utils.sysexec("vgscan", log) utils.sysexec("vgchange -ay planetlab", log) except BootManagerException as e: - log.write("BootManagerException during vgscan/vgchange: {}\n"\ - .format(str(e))) + log.write("BootManagerException during vgscan/vgchange: {}\n".format(e)) return 0 utils.makedirs(SYSIMG_PATH) diff --git a/source/utils.py b/source/utils.py index 70f37fd..652d809 100644 --- a/source/utils.py +++ b/source/utils.py @@ -43,7 +43,7 @@ VERBOSE_MODE = True # in seconds : if no input, proceed PROMPT_TIMEOUT = 5 -def prompt_for_breakpoint_mode (): +def prompt_for_breakpoint_mode(): global BREAKPOINT_MODE if PROMPT_MODE: @@ -222,8 +222,8 @@ def sysexec_noerr(cmd, log=None, shell=False): same as sysexec, but capture boot manager exceptions """ try: - rc= 0 - rc= sysexec(cmd, log, shell=shell) + rc = 0 + rc = sysexec(cmd, log, shell=shell) except BootManagerException as e: pass