From 9cb3130b0b87eabe458df7dc113f00431ff3648e Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Sat, 10 Nov 2012 22:24:01 -0500 Subject: revert unrelated whitespace changes that creeped in. --- cloudinit/distros/__init__.py | 38 +++++++++++++++++---------------- cloudinit/sources/DataSourceAltCloud.py | 2 +- cloudinit/util.py | 3 ++- 3 files changed, 23 insertions(+), 20 deletions(-) (limited to 'cloudinit') diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py index 8a98e334..d2cb0a8b 100644 --- a/cloudinit/distros/__init__.py +++ b/cloudinit/distros/__init__.py @@ -187,23 +187,23 @@ class Distro(object): # inputs. If something goes wrong, we can end up with a system # that nobody can login to. adduser_opts = { - "gecos": '--comment', - "homedir": '--home', - "primary_group": '--gid', - "groups": '--groups', - "passwd": '--password', - "shell": '--shell', - "expiredate": '--expiredate', - "inactive": '--inactive', - "selinux_user": '--selinux-user', - } + "gecos": '--comment', + "homedir": '--home', + "primary_group": '--gid', + "groups": '--groups', + "passwd": '--password', + "shell": '--shell', + "expiredate": '--expiredate', + "inactive": '--inactive', + "selinux_user": '--selinux-user', + } adduser_opts_flags = { - "no_user_group": '--no-user-group', - "system": '--system', - "no_log_init": '--no-log-init', - "no_create_home": "-M", - } + "no_user_group": '--no-user-group', + "system": '--system', + "no_log_init": '--no-log-init', + "no_create_home": "-M", + } # Now check the value and create the command for option in kwargs: @@ -320,9 +320,11 @@ class Distro(object): raise e util.ensure_dir(path, 0750) - def write_sudo_rules(self, user, rules, sudo_file=None): - if not sudo_file: - sudo_file = "/etc/sudoers.d/90-cloud-init-users" + def write_sudo_rules(self, + user, + rules, + sudo_file="/etc/sudoers.d/90-cloud-init-users", + ): content_header = "# user rules for %s" % user content = "%s\n%s %s\n\n" % (content_header, user, rules) diff --git a/cloudinit/sources/DataSourceAltCloud.py b/cloudinit/sources/DataSourceAltCloud.py index 9812bdcb..d7e1204f 100644 --- a/cloudinit/sources/DataSourceAltCloud.py +++ b/cloudinit/sources/DataSourceAltCloud.py @@ -47,7 +47,7 @@ META_DATA_NOT_SUPPORTED = { 'instance-id': 455, 'local-hostname': 'localhost', 'placement': {}, -} + } def read_user_data_callback(mount_dir): diff --git a/cloudinit/util.py b/cloudinit/util.py index 4f5b15ee..7890a3d6 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -1193,7 +1193,8 @@ def yaml_dumps(obj): indent=4, explicit_start=True, explicit_end=True, - default_flow_style=False) + default_flow_style=False, + ) return formatted -- cgit v1.2.3