summaryrefslogtreecommitdiff
path: root/cloudinit/distros
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-06-15 23:28:51 -0400
committerScott Moser <smoser@ubuntu.com>2016-06-15 23:28:51 -0400
commita066f95c67bb5fa15350cdff319f60d589274c3a (patch)
tree790d277e08dd39da82dd956c89709e17538a1a82 /cloudinit/distros
parenta454a6408b3c7ecc816073049d060632191099bb (diff)
parentd598ceeb838b4ccaf667ded84bb02bf096ab7b12 (diff)
downloadvyos-cloud-init-a066f95c67bb5fa15350cdff319f60d589274c3a.tar.gz
vyos-cloud-init-a066f95c67bb5fa15350cdff319f60d589274c3a.zip
merge with trunk
Diffstat (limited to 'cloudinit/distros')
-rw-r--r--cloudinit/distros/__init__.py2
-rw-r--r--cloudinit/distros/arch.py4
-rw-r--r--cloudinit/distros/debian.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index 5c29c804..14b500f8 100644
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -454,7 +454,7 @@ class Distro(object):
keys = kwargs['ssh_authorized_keys']
if isinstance(keys, six.string_types):
keys = [keys]
- if isinstance(keys, dict):
+ elif isinstance(keys, dict):
keys = list(keys.values())
if keys is not None:
if not isinstance(keys, (tuple, list, set)):
diff --git a/cloudinit/distros/arch.py b/cloudinit/distros/arch.py
index 93a2e008..66209f22 100644
--- a/cloudinit/distros/arch.py
+++ b/cloudinit/distros/arch.py
@@ -196,6 +196,6 @@ def convert_resolv_conf(settings):
"""Returns a settings string formatted for resolv.conf."""
result = ''
if isinstance(settings, list):
- for ns in list:
+ for ns in settings:
result = result + 'nameserver %s\n' % ns
- return result
+ return result
diff --git a/cloudinit/distros/debian.py b/cloudinit/distros/debian.py
index 511ed4fe..53f3aa4d 100644
--- a/cloudinit/distros/debian.py
+++ b/cloudinit/distros/debian.py
@@ -25,8 +25,8 @@ import os
from cloudinit import distros
from cloudinit import helpers
from cloudinit import log as logging
-from cloudinit import net
from cloudinit.net import eni
+from cloudinit.net.network_state import parse_net_config_data
from cloudinit import util
from cloudinit.distros.parsers.hostname import HostnameConf
@@ -85,7 +85,7 @@ class Distro(distros.Distro):
return ['all']
def _write_network_config(self, netconfig):
- ns = net.parse_net_config_data(netconfig)
+ ns = parse_net_config_data(netconfig)
self._net_renderer.render_network_state("/", ns)
_maybe_remove_legacy_eth0()
return []