diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-01-17 12:41:09 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-01-17 12:41:09 -0500 |
commit | ec070cdf8746651d6dea011bd3ea9a445223028c (patch) | |
tree | acc620e1f0423910a4d0ea0d79ee231290e4a393 /cloudinit/CloudConfig/cc_puppet.py | |
parent | 1a1da7c11e8bbb7e9f4b06a06ee5d6b18fdc1efc (diff) | |
download | vyos-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_puppet.py')
-rw-r--r-- | cloudinit/CloudConfig/cc_puppet.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cloudinit/CloudConfig/cc_puppet.py b/cloudinit/CloudConfig/cc_puppet.py index 2686c849..5fb0c1ee 100644 --- a/cloudinit/CloudConfig/cc_puppet.py +++ b/cloudinit/CloudConfig/cc_puppet.py @@ -39,8 +39,10 @@ def handle(_name, cfg, cloud, log, _args): puppet_conf_fh = open('/etc/puppet/puppet.conf', 'r') # Create object for reading puppet.conf values puppet_config = ConfigParser.ConfigParser() - # Read puppet.conf values from original file in order to be able to mix the rest up - puppet_config.readfp(StringIO.StringIO(''.join(i.lstrip() for i in puppet_conf_fh.readlines()))) + # Read puppet.conf values from original file in order to be able to + # mix the rest up + puppet_config.readfp(StringIO.StringIO(''.join(i.lstrip() for i in + puppet_conf_fh.readlines()))) # Close original file, no longer needed puppet_conf_fh.close() for cfg_name, cfg in puppet_cfg['conf'].iteritems(): @@ -64,7 +66,8 @@ def handle(_name, cfg, cloud, log, _args): util.restorecon_if_possible('/var/lib/puppet', recursive=True) else: #puppet_conf_fh.write("\n[%s]\n" % (cfg_name)) - # If puppet.conf already has this section we don't want to write it again + # If puppet.conf already has this section we don't want to + # write it again if puppet_config.has_section(cfg_name) == False: puppet_config.add_section(cfg_name) # Iterate throug the config items, we'll use ConfigParser.set |