summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-08-22 20:39:15 -0400
committerScott Moser <smoser@ubuntu.com>2012-08-22 20:39:15 -0400
commitd59ab509f6482b8b3af4fd9f2728ad1209d5b2e2 (patch)
treed60921f18cf63946857cba0a621f44775e25b23e
parent6564861d44f843bb4e339db5691021ec7a95c511 (diff)
downloadvyos-cloud-init-d59ab509f6482b8b3af4fd9f2728ad1209d5b2e2.tar.gz
vyos-cloud-init-d59ab509f6482b8b3af4fd9f2728ad1209d5b2e2.zip
fix errors from 'make pep8'
-rw-r--r--cloudinit/config/cc_set_passwords.py2
-rw-r--r--cloudinit/config/cc_ssh_import_id.py2
-rw-r--r--cloudinit/config/cc_users_groups.py12
-rw-r--r--cloudinit/distros/__init__.py3
-rw-r--r--cloudinit/distros/ubuntu.py3
-rw-r--r--cloudinit/util.py4
6 files changed, 13 insertions, 13 deletions
diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py
index 4bf62aa9..7d0fbd9f 100644
--- a/cloudinit/config/cc_set_passwords.py
+++ b/cloudinit/config/cc_set_passwords.py
@@ -53,7 +53,7 @@ def handle(_name, cfg, cloud, log, args):
user = cloud.distro.get_default_user()
if 'users' in cfg:
- user_zero = cfg['users'].keys()[0]
+ user_zero = cfg['users'].keys()[0]
if user_zero != "default":
user = user_zero
diff --git a/cloudinit/config/cc_ssh_import_id.py b/cloudinit/config/cc_ssh_import_id.py
index 9aee2166..cd97b99b 100644
--- a/cloudinit/config/cc_ssh_import_id.py
+++ b/cloudinit/config/cc_ssh_import_id.py
@@ -35,7 +35,7 @@ def handle(name, cfg, cloud, log, args):
user = cloud.distro.get_default_user()
if 'users' in cfg:
- user_zero = cfg['users'].keys()[0]
+ user_zero = cfg['users'].keys()[0]
if user_zero != "default":
user = user_zero
diff --git a/cloudinit/config/cc_users_groups.py b/cloudinit/config/cc_users_groups.py
index 7e5ecc7b..cbb351dc 100644
--- a/cloudinit/config/cc_users_groups.py
+++ b/cloudinit/config/cc_users_groups.py
@@ -17,14 +17,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import grp
-import pwd
import os
+import pwd
import traceback
+from cloudinit.settings import PER_INSTANCE
+from cloudinit import ssh_util
from cloudinit import templater
from cloudinit import util
-from cloudinit import ssh_util
-from cloudinit.settings import PER_INSTANCE
frequency = PER_INSTANCE
@@ -45,7 +45,7 @@ def handle(name, cfg, cloud, log, _args):
else:
cloud.distro.create_group(item, [])
- if 'users' in cfg:
+ if 'users' in cfg:
user_zero = None
for name, user_config in cfg['users'].iteritems():
@@ -68,8 +68,8 @@ def handle(name, cfg, cloud, log, _args):
if user_zero == name:
user_zero = None
- log.warn("Distro has not implemented default user " \
- "creation. No default user will be created")
+ log.warn("Distro has not implemented default user "
+ "creation. No default user will be created")
else:
# Make options friendly for distro.create_user
new_opts = {}
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index 2dfb1409..1f46c5aa 100644
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -31,8 +31,8 @@ import re
from cloudinit import importer
from cloudinit import log as logging
-from cloudinit import util
from cloudinit import ssh_util
+from cloudinit import util
# TODO(harlowja): Make this via config??
IFACE_ACTIONS = {
@@ -192,7 +192,6 @@ class Distro(object):
def get_default_user(self):
return None
-
def create_user(self, name, **kwargs):
"""
Creates users for the system using the GNU passwd tools. This
diff --git a/cloudinit/distros/ubuntu.py b/cloudinit/distros/ubuntu.py
index 423fee73..a6d665e0 100644
--- a/cloudinit/distros/ubuntu.py
+++ b/cloudinit/distros/ubuntu.py
@@ -25,8 +25,9 @@ from cloudinit import distros
from cloudinit.distros import debian
from cloudinit import helpers
from cloudinit import log as logging
-from cloudinit import util
from cloudinit.settings import PER_INSTANCE
+from cloudinit import util
+
import hashlib
import pwd
diff --git a/cloudinit/util.py b/cloudinit/util.py
index 7d56e8be..7f47341a 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1337,10 +1337,10 @@ def subp(args, data=None, rcs=None, env=None, capture=True, shell=False, logstri
if not logstring:
LOG.debug(("Running command %s with allowed return codes %s"
- " (shell=%s, capture=%s)"), args, rcs, shell, capture)
+ " (shell=%s, capture=%s)"), args, rcs, shell, capture)
else:
LOG.debug(("Running hidden command to protect sensitive input/output "
- " logstring: %s" ), logstring)
+ " logstring: %s"), logstring)
if not capture:
stdout = None