Merge lp:~raharper/cloud-init/trunk.fix-trusty-pep8 into lp:~cloud-init-dev/cloud-init/trunk

Proposed by Ryan Harper
Status: Merged
Merged at revision: 1176
Proposed branch: lp:~raharper/cloud-init/trunk.fix-trusty-pep8
Merge into: lp:~cloud-init-dev/cloud-init/trunk
Diff against target: 43 lines (+4/-6)
3 files modified
cloudinit/config/cc_rh_subscription.py (+1/-3)
tests/unittests/test_datasource/test_azure.py (+1/-1)
tools/hacking.py (+2/-2)
To merge this branch: bzr merge lp:~raharper/cloud-init/trunk.fix-trusty-pep8
Reviewer Review Type Date Requested Status
Scott Moser Pending
Review via email: mp+288126@code.launchpad.net

Description of the change

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.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cloudinit/config/cc_rh_subscription.py'
2--- cloudinit/config/cc_rh_subscription.py 2016-03-03 22:20:10 +0000
3+++ cloudinit/config/cc_rh_subscription.py 2016-03-04 16:06:18 +0000
4@@ -126,10 +126,8 @@
5 "(True/False "
6 return False, not_bool
7
8- if (self.servicelevel is not None) and \
9- ((not self.auto_attach) or
10+ if (self.servicelevel is not None) and ((not self.auto_attach) or
11 (util.is_false(str(self.auto_attach)))):
12-
13 no_auto = ("The service-level key must be used in conjunction "
14 "with the auto-attach key. Please re-run with "
15 "auto-attach: True")
16
17=== modified file 'tests/unittests/test_datasource/test_azure.py'
18--- tests/unittests/test_datasource/test_azure.py 2016-03-03 22:20:10 +0000
19+++ tests/unittests/test_datasource/test_azure.py 2016-03-04 16:06:18 +0000
20@@ -268,7 +268,7 @@
21 pos = defuser['passwd'].rfind("$") + 1
22 self.assertEqual(defuser['passwd'],
23 crypt.crypt(odata['UserPassword'],
24- defuser['passwd'][0:pos]))
25+ defuser['passwd'][0:pos]))
26
27 def test_userdata_plain(self):
28 mydata = "FOOBAR"
29
30=== modified file 'tools/hacking.py'
31--- tools/hacking.py 2016-03-03 22:20:10 +0000
32+++ tools/hacking.py 2016-03-04 16:06:18 +0000
33@@ -49,8 +49,8 @@
34 if (line.startswith("from ") and "," not in line and
35 split_line[2] == "import" and split_line[3] != "*" and
36 split_line[1] != "__future__" and
37- (len(split_line) == 4 or
38- (len(split_line) == 6 and split_line[4] == "as"))):
39+ (len(split_line) == 4 or (len(split_line) == 6 and
40+ split_line[4] == "as"))):
41 return "import %s.%s" % (split_line[1], split_line[3])
42 else:
43 return line