summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-01-06 12:02:38 -0500
committerScott Moser <smoser@ubuntu.com>2015-01-06 12:02:38 -0500
commit38c851e58e09c5574661ef4b2d2e66f6e38063d1 (patch)
treed136c739ba324802e90b7afede5429254e519475 /cloudinit
parentfa5ce8c40621c78e61c7d9bd073903101f7d6a5e (diff)
downloadvyos-cloud-init-38c851e58e09c5574661ef4b2d2e66f6e38063d1.tar.gz
vyos-cloud-init-38c851e58e09c5574661ef4b2d2e66f6e38063d1.zip
tools/run-pep8: remove leading ',' fed to --ignore
--ignore was being called with ',E121,E...' rather than 'E121,E...'. that resulted in odd behavior, missing the pep8 errors that are fixed here.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/distros/freebsd.py3
-rw-r--r--cloudinit/distros/net_util.py1
-rw-r--r--cloudinit/distros/rhel.py2
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py4
-rw-r--r--cloudinit/sources/DataSourceDigitalOcean.py11
-rw-r--r--cloudinit/util.py2
6 files changed, 12 insertions, 11 deletions
diff --git a/cloudinit/distros/freebsd.py b/cloudinit/distros/freebsd.py
index ee23fd20..9216510e 100644
--- a/cloudinit/distros/freebsd.py
+++ b/cloudinit/distros/freebsd.py
@@ -119,7 +119,8 @@ class Distro(distros.Distro):
index = n.group(0)
(out, err) = util.subp(['ifconfig', '-a'])
- ifconfigoutput = [x for x in (out.strip()).splitlines() if len(x.split()) > 0]
+ ifconfigoutput = [x for x in (out.strip()).splitlines()
+ if len(x.split()) > 0]
for line in ifconfigoutput:
m = re.match('^\w+', line)
if m:
diff --git a/cloudinit/distros/net_util.py b/cloudinit/distros/net_util.py
index dd63a6a3..8b28e2d1 100644
--- a/cloudinit/distros/net_util.py
+++ b/cloudinit/distros/net_util.py
@@ -180,4 +180,3 @@ def translate_network(settings):
if cmd == 'iface' and 'inet6' in args:
real_ifaces[dev_name]['inet6'] = True
return real_ifaces
-
diff --git a/cloudinit/distros/rhel.py b/cloudinit/distros/rhel.py
index d5cc15fe..d9588632 100644
--- a/cloudinit/distros/rhel.py
+++ b/cloudinit/distros/rhel.py
@@ -91,7 +91,7 @@ class Distro(distros.Distro):
'IPV6INIT': _make_sysconfig_bool(True),
'IPV6ADDR': info.get('ipv6').get('address'),
'IPV6_DEFAULTGW': info.get('ipv6').get('gateway'),
- })
+ })
rhel_util.update_sysconfig_file(net_fn, net_cfg)
if 'dns-nameservers' in info:
nameservers.extend(info['dns-nameservers'])
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 27658073..15244a0d 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -79,8 +79,8 @@ class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource):
else:
mtype = None
sync = True
- results = util.mount_cb(dev, read_config_drive, mtype=mtype,
- sync=sync)
+ results = util.mount_cb(dev, read_config_drive,
+ mtype=mtype, sync=sync)
found = dev
except openstack.NonReadable:
pass
diff --git a/cloudinit/sources/DataSourceDigitalOcean.py b/cloudinit/sources/DataSourceDigitalOcean.py
index 069bdb41..8f27ee89 100644
--- a/cloudinit/sources/DataSourceDigitalOcean.py
+++ b/cloudinit/sources/DataSourceDigitalOcean.py
@@ -31,6 +31,7 @@ BUILTIN_DS_CONFIG = {
MD_RETRIES = 0
MD_TIMEOUT = 1
+
class DataSourceDigitalOcean(sources.DataSource):
def __init__(self, sys_cfg, distro, paths):
sources.DataSource.__init__(self, sys_cfg, distro, paths)
@@ -51,10 +52,10 @@ class DataSourceDigitalOcean(sources.DataSource):
self.timeout = MD_TIMEOUT
def get_data(self):
- caller = functools.partial(util.read_file_or_url, timeout=self.timeout,
- retries=self.retries)
+ caller = functools.partial(util.read_file_or_url,
+ timeout=self.timeout, retries=self.retries)
md = ec2_utils.MetadataMaterializer(str(caller(self.metadata_address)),
- base_url=self.metadata_address,
+ base_url=self.metadata_address,
caller=caller)
self.metadata = md.materialize()
@@ -72,9 +73,9 @@ class DataSourceDigitalOcean(sources.DataSource):
def get_public_ssh_keys(self):
if type(self.metadata['public-keys']) is StringType:
- return [self.metadata['public-keys']]
+ return [self.metadata['public-keys']]
else:
- return self.metadata['public-keys']
+ return self.metadata['public-keys']
@property
def availability_zone(self):
diff --git a/cloudinit/util.py b/cloudinit/util.py
index ee5e5c0a..bf8e7d80 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1966,7 +1966,7 @@ def pathprefix2dict(base, required=None, optional=None, delim=os.path.sep):
def read_meminfo(meminfo="/proc/meminfo", raw=False):
# read a /proc/meminfo style file and return
# a dict with 'total', 'free', and 'available'
- mpliers = {'kB': 2**10, 'mB': 2 ** 20, 'B': 1, 'gB': 2 ** 30}
+ mpliers = {'kB': 2 ** 10, 'mB': 2 ** 20, 'B': 1, 'gB': 2 ** 30}
kmap = {'MemTotal:': 'total', 'MemFree:': 'free',
'MemAvailable:': 'available'}
ret = {}