fix errors from 'make pep8'

This commit is contained in:
Scott Moser
2012-08-22 20:39:15 -04:00
parent 5513374484
commit 1de89fddb8
6 changed files with 13 additions and 13 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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 = {}

View File

@@ -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

View File

@@ -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

View File

@@ -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