summaryrefslogtreecommitdiff
path: root/cloud-init.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-01-17 12:35:45 -0500
committerScott Moser <smoser@ubuntu.com>2012-01-17 12:35:45 -0500
commit1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc (patch)
tree2aaa1e47949d588bc11f05d2c139ca98b51d0ca5 /cloud-init.py
parentc33eedb47b2b22c797051da197fd80e74f1db179 (diff)
downloadvyos-cloud-init-1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc.tar.gz
vyos-cloud-init-1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc.zip
[PATCH 3/4] Fix pylint conventions C0324 (comma not followed by a space)
From: Juerg Haefliger <juerg.haefliger@hp.com>
Diffstat (limited to 'cloud-init.py')
-rwxr-xr-xcloud-init.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/cloud-init.py b/cloud-init.py
index f6313ba2..9806c22c 100755
--- a/cloud-init.py
+++ b/cloud-init.py
@@ -54,7 +54,7 @@ def main():
sys.stderr.write("bad command %s. use one of %s\n" % (cmd, cmds))
sys.exit(1)
- now = time.strftime("%a, %d %b %Y %H:%M:%S %z",time.gmtime())
+ now = time.strftime("%a, %d %b %Y %H:%M:%S %z", time.gmtime())
try:
uptimef = open("/proc/uptime")
uptime = uptimef.read().split(" ")[0]
@@ -74,7 +74,7 @@ def main():
raise
try:
- (outfmt, errfmt) = CC.get_output_cfg(cfg,"init")
+ (outfmt, errfmt) = CC.get_output_cfg(cfg, "init")
CC.redirect_output(outfmt, errfmt)
except Exception as e:
warn("Failed to get and set output config: %s\n" % e)
@@ -98,7 +98,7 @@ def main():
# most sense to exit early and silently
for f in stop_files:
try:
- fp = open(f,"r")
+ fp = open(f, "r")
fp.close()
except:
continue
@@ -109,7 +109,7 @@ def main():
# cache is not instance specific, so it has to be purged
# but we want 'start' to benefit from a cache if
# a previous start-local populated one
- manclean = util.get_cfg_option_bool(cfg, 'manual_cache_clean',False)
+ manclean = util.get_cfg_option_bool(cfg, 'manual_cache_clean', False)
if manclean:
log.debug("not purging cache, manual_cache_clean = True")
cloudinit.purge_cache(not manclean)
@@ -147,7 +147,7 @@ def main():
# parse the user data (ec2-run-userdata.py)
try:
ran = cloud.sem_and_run("consume_userdata", cloudinit.per_instance,
- cloud.consume_userdata,[cloudinit.per_instance],False)
+ cloud.consume_userdata, [cloudinit.per_instance], False)
if not ran:
cloud.consume_userdata(cloudinit.per_always)
except:
@@ -161,9 +161,9 @@ def main():
try:
outfmt_orig = outfmt
errfmt_orig = errfmt
- (outfmt, errfmt) = CC.get_output_cfg(cc.cfg,"init")
+ (outfmt, errfmt) = CC.get_output_cfg(cc.cfg, "init")
if outfmt_orig != outfmt or errfmt_orig != errfmt:
- warn("stdout, stderr changing to (%s,%s)" % (outfmt,errfmt))
+ warn("stdout, stderr changing to (%s,%s)" % (outfmt, errfmt))
CC.redirect_output(outfmt, errfmt)
except Exception as e:
warn("Failed to get and set output config: %s\n" % e)
@@ -174,15 +174,15 @@ def main():
['initctl', 'emit', 'cloud-config',
'%s=%s' % (cloudinit.cfg_env_name, cc_path) ])
if cc_ready:
- if isinstance(cc_ready,str):
+ if isinstance(cc_ready, str):
cc_ready = [ 'sh', '-c', cc_ready]
subprocess.Popen(cc_ready).communicate()
- module_list = CC.read_cc_modules(cc.cfg,"cloud_init_modules")
+ module_list = CC.read_cc_modules(cc.cfg, "cloud_init_modules")
failures = []
if len(module_list):
- failures = CC.run_cc_modules(cc,module_list,log)
+ failures = CC.run_cc_modules(cc, module_list, log)
else:
msg = "no cloud_init_modules to run"
sys.stderr.write(msg + "\n")