diff options
author | Scott Moser <smoser@ubuntu.com> | 2014-07-24 09:06:16 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-07-24 09:06:16 -0400 |
commit | d6b77380f9e0a3d083300c6168c71466068094cf (patch) | |
tree | 8e378bded7b52928843752347d0518c6d124b8e1 | |
parent | 97590a239dfb49d4dff216058a83852a635fd3f6 (diff) | |
download | vyos-cloud-init-d6b77380f9e0a3d083300c6168c71466068094cf.tar.gz vyos-cloud-init-d6b77380f9e0a3d083300c6168c71466068094cf.zip |
pep8 fixes (2 unrelated to this mp)
-rw-r--r-- | cloudinit/netinfo.py | 4 | ||||
-rwxr-xr-x | setup.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_handler/test_handler_growpart.py | 4 | ||||
-rw-r--r-- | tests/unittests/test_handler/test_handler_seed_random.py | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/cloudinit/netinfo.py b/cloudinit/netinfo.py index 30b6f3b3..1bdca9f7 100644 --- a/cloudinit/netinfo.py +++ b/cloudinit/netinfo.py @@ -56,8 +56,8 @@ def netdev_info(empty=""): # newer (freebsd and fedora) show 'inet xx.yy' # just skip this 'inet' entry. (LP: #1285185) try: - if (toks[i] in ("inet", "inet6") and - toks[i + 1].startswith("addr:")): + if ((toks[i] in ("inet", "inet6") and + toks[i + 1].startswith("addr:"))): continue except IndexError: pass @@ -35,6 +35,7 @@ import subprocess def is_f(p): return os.path.isfile(p) + def tiny_p(cmd, capture=True): # Darn python 2.6 doesn't have check_output (argggg) stdout = subprocess.PIPE @@ -51,6 +52,7 @@ def tiny_p(cmd, capture=True): % (cmd, ret, out, err)) return (out, err) + def systemd_unitdir(): cmd = ['pkg-config', '--variable=systemdsystemunitdir', 'systemd'] try: diff --git a/tests/unittests/test_handler/test_handler_growpart.py b/tests/unittests/test_handler/test_handler_growpart.py index f2ed4597..f6dc4521 100644 --- a/tests/unittests/test_handler/test_handler_growpart.py +++ b/tests/unittests/test_handler/test_handler_growpart.py @@ -188,8 +188,8 @@ class TestResize(MockerTestCase): self.assertEqual(cc_growpart.RESIZE.SKIPPED, find(enoent[0], resized)[1]) #self.assertEqual(resize_calls, - #[("/dev/XXda", "1", "/dev/XXda1"), - #("/dev/YYda", "2", "/dev/YYda2")]) + # [("/dev/XXda", "1", "/dev/XXda1"), + # ("/dev/YYda", "2", "/dev/YYda2")]) finally: cc_growpart.device_part_info = opinfo os.stat = real_stat diff --git a/tests/unittests/test_handler/test_handler_seed_random.py b/tests/unittests/test_handler/test_handler_seed_random.py index 7bddb238..40481f16 100644 --- a/tests/unittests/test_handler/test_handler_seed_random.py +++ b/tests/unittests/test_handler/test_handler_seed_random.py @@ -1,4 +1,4 @@ - # Copyright (C) 2013 Hewlett-Packard Development Company, L.P. +# Copyright (C) 2013 Hewlett-Packard Development Company, L.P. # # Author: Juerg Haefliger <juerg.haefliger@hp.com> # |