summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-03-04 14:00:05 -0500
committerScott Moser <smoser@ubuntu.com>2016-03-04 14:00:05 -0500
commit5db46cfb68422b0c14d4a6c097553edd0016de3f (patch)
treeb59d76e1f17c5a1ac41dd6619068e2e63a4461b8
parent6aa82c9682406e03268939fff362a397b54fb9a4 (diff)
parent70acc910c3368980d7cb8971391a2c9dfaf3fda8 (diff)
downloadvyos-cloud-init-5db46cfb68422b0c14d4a6c097553edd0016de3f.tar.gz
vyos-cloud-init-5db46cfb68422b0c14d4a6c097553edd0016de3f.zip
pep8: update formatting to pass pep8 1.4.6 (trusty) and 1.6.2 (xenial)
make check fails in a trusty sbuild due to different rules on older pep8. Fix formatting to pass in older and newer pep8.
-rw-r--r--cloudinit/config/cc_rh_subscription.py4
-rw-r--r--tests/unittests/test_datasource/test_azure.py2
-rwxr-xr-xtools/hacking.py4
3 files changed, 4 insertions, 6 deletions
diff --git a/cloudinit/config/cc_rh_subscription.py b/cloudinit/config/cc_rh_subscription.py
index 6f474aed..6087c45c 100644
--- a/cloudinit/config/cc_rh_subscription.py
+++ b/cloudinit/config/cc_rh_subscription.py
@@ -126,10 +126,8 @@ class SubscriptionManager(object):
"(True/False "
return False, not_bool
- if (self.servicelevel is not None) and \
- ((not self.auto_attach) or
+ if (self.servicelevel is not None) and ((not self.auto_attach) or
(util.is_false(str(self.auto_attach)))):
-
no_auto = ("The service-level key must be used in conjunction "
"with the auto-attach key. Please re-run with "
"auto-attach: True")
diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py
index 4c9c7d8b..444e2799 100644
--- a/tests/unittests/test_datasource/test_azure.py
+++ b/tests/unittests/test_datasource/test_azure.py
@@ -268,7 +268,7 @@ class TestAzureDataSource(TestCase):
pos = defuser['passwd'].rfind("$") + 1
self.assertEqual(defuser['passwd'],
crypt.crypt(odata['UserPassword'],
- defuser['passwd'][0:pos]))
+ defuser['passwd'][0:pos]))
def test_userdata_plain(self):
mydata = "FOOBAR"
diff --git a/tools/hacking.py b/tools/hacking.py
index 1a0631c2..716c1154 100755
--- a/tools/hacking.py
+++ b/tools/hacking.py
@@ -49,8 +49,8 @@ def import_normalize(line):
if (line.startswith("from ") and "," not in line and
split_line[2] == "import" and split_line[3] != "*" and
split_line[1] != "__future__" and
- (len(split_line) == 4 or
- (len(split_line) == 6 and split_line[4] == "as"))):
+ (len(split_line) == 4 or (len(split_line) == 6 and
+ split_line[4] == "as"))):
return "import %s.%s" % (split_line[1], split_line[3])
else:
return line