pep8 fixes (2 unrelated to this mp)

This commit is contained in:
Scott Moser 2014-07-24 09:06:16 -04:00
parent 6f9d4a939b
commit 2bfeaf78c9
4 changed files with 7 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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