From 58886d757ebd832e8c0de45981a51242370d40fc Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Tue, 13 Nov 2012 08:59:21 -0500 Subject: pep8 and pylint --- cloudinit/config/cc_power_state_change.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cloudinit/config') diff --git a/cloudinit/config/cc_power_state_change.py b/cloudinit/config/cc_power_state_change.py index d921a444..67e0316b 100644 --- a/cloudinit/config/cc_power_state_change.py +++ b/cloudinit/config/cc_power_state_change.py @@ -28,7 +28,7 @@ import time frequency = PER_INSTANCE -def handle(_name, cfg, _cloud, log, _args): +def handle(_name, cfg, cloud, log, _args): finalcmds = cfg.get("finalcmd") @@ -70,15 +70,15 @@ def handle(_name, cfg, _cloud, log, _args): def execmd(exe_args, data_in=None, output=None): try: proc = subprocess.Popen(exe_args, stdin=subprocess.PIPE, - stdout=output, stderr=subprocess.STDERR) + stdout=output, stderr=subprocess.STDOUT) proc.communicate(data_in) - except Exception as e: + except Exception: return 254 return proc.returncode() def runfinal(shellcode, finalcmd_d, output=None): - ret = execmd(["/bin/sh",], data_in=shellcode, output=output) + ret = execmd(["/bin/sh"], data_in=shellcode, output=output) if not (finalcmd_d and os.path.isdir(finalcmd_d)): sys.exit(ret) -- cgit v1.2.3