summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig/cc_mcollective.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-01-17 12:41:09 -0500
committerScott Moser <smoser@ubuntu.com>2012-01-17 12:41:09 -0500
commitec070cdf8746651d6dea011bd3ea9a445223028c (patch)
treeacc620e1f0423910a4d0ea0d79ee231290e4a393 /cloudinit/CloudConfig/cc_mcollective.py
parent1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc (diff)
downloadvyos-cloud-init-ec070cdf8746651d6dea011bd3ea9a445223028c.tar.gz
vyos-cloud-init-ec070cdf8746651d6dea011bd3ea9a445223028c.zip
[PATCH 4/4] Fix pylint conventions C0301 (line too long)
From: Juerg Haefliger <juerg.haefliger@hp.com>
Diffstat (limited to 'cloudinit/CloudConfig/cc_mcollective.py')
-rw-r--r--cloudinit/CloudConfig/cc_mcollective.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/cloudinit/CloudConfig/cc_mcollective.py b/cloudinit/CloudConfig/cc_mcollective.py
index ec5da4f8..8ad8caab 100644
--- a/cloudinit/CloudConfig/cc_mcollective.py
+++ b/cloudinit/CloudConfig/cc_mcollective.py
@@ -53,8 +53,10 @@ def handle(_name, cfg, _cloud, _log, _args):
if mcollective_cfg.has_key('conf'):
# Create object for reading server.cfg values
mcollective_config = ConfigParser.ConfigParser()
- # Read server.cfg values from original file in order to be able to mix the rest up
- mcollective_config.readfp(FakeSecHead(open('/etc/mcollective/server.cfg')))
+ # Read server.cfg values from original file in order to be able to mix
+ # the rest up
+ mcollective_config.readfp(FakeSecHead(open('/etc/mcollective/'
+ 'server.cfg')))
for cfg_name, cfg in mcollective_cfg['conf'].iteritems():
if cfg_name == 'public-cert':
util.write_file(pubcert_file, cfg, mode=0644)
@@ -73,7 +75,8 @@ def handle(_name, cfg, _cloud, _log, _args):
mcollective_config.set(cfg_name, o, v)
# We got all our config as wanted we'll rename
# the previous server.cfg and create our new one
- os.rename('/etc/mcollective/server.cfg', '/etc/mcollective/server.cfg.old')
+ os.rename('/etc/mcollective/server.cfg',
+ '/etc/mcollective/server.cfg.old')
outputfile = StringIO.StringIO()
mcollective_config.write(outputfile)
# Now we got the whole file, write to disk except first line
@@ -83,7 +86,8 @@ def handle(_name, cfg, _cloud, _log, _args):
# search and replace of '=' with ':' could be problematic though.
# this most likely needs fixing.
util.write_file('/etc/mcollective/server.cfg',
- outputfile.getvalue().replace('[nullsection]\n', '').replace(' =', ':'),
+ outputfile.getvalue().replace('[nullsection]\n', '').replace(' =',
+ ':'),
mode=0644)
# Start mcollective