diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-11-13 08:59:21 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-11-13 08:59:21 -0500 |
commit | 58886d757ebd832e8c0de45981a51242370d40fc (patch) | |
tree | 887bdbb54f3999290ee0607ce1326ab2f47a9085 | |
parent | 71928e8c70900843dce4aa3ae84fcd278e4b887a (diff) | |
download | vyos-cloud-init-58886d757ebd832e8c0de45981a51242370d40fc.tar.gz vyos-cloud-init-58886d757ebd832e8c0de45981a51242370d40fc.zip |
pep8 and pylint
-rw-r--r-- | cloudinit/config/cc_power_state_change.py | 8 |
1 files changed, 4 insertions, 4 deletions
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) |