summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-03-19 09:06:31 -0400
committerScott Moser <smoser@ubuntu.com>2013-03-19 09:06:31 -0400
commitf8318f8eec9c8f1c1676ce6a5b5c2c77fa2f7cc5 (patch)
tree09a07ba4b0ef86b296597ef8876a731901b43cc6 /cloudinit/util.py
parentae0f94c8f39a234d73ab8e2caf24d73439c8b5ee (diff)
downloadvyos-cloud-init-f8318f8eec9c8f1c1676ce6a5b5c2c77fa2f7cc5.tar.gz
vyos-cloud-init-f8318f8eec9c8f1c1676ce6a5b5c2c77fa2f7cc5.zip
pylint fixes
a.) appease pylint on raring, as it doesn't like subprocess pylint: 0.26.0-1ubuntu1 This is mentioned in comments at http://www.logilab.org/ticket/46273 b.) tests/unittests/test_util.py: the mountinfo lines are longer than 80 chars. Just disable long lines complaints for this file.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index 10297ca2..636ed20e 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -462,7 +462,7 @@ def redirect_output(outfmt, errfmt, o_out=None, o_err=None):
new_fp = open(arg, owith)
elif mode == "|":
proc = subprocess.Popen(arg, shell=True, stdin=subprocess.PIPE)
- new_fp = proc.stdin
+ new_fp = proc.stdin # pylint: disable=E1101
else:
raise TypeError("Invalid type for output format: %s" % outfmt)
@@ -484,7 +484,7 @@ def redirect_output(outfmt, errfmt, o_out=None, o_err=None):
new_fp = open(arg, owith)
elif mode == "|":
proc = subprocess.Popen(arg, shell=True, stdin=subprocess.PIPE)
- new_fp = proc.stdin
+ new_fp = proc.stdin # pylint: disable=E1101
else:
raise TypeError("Invalid type for error format: %s" % errfmt)
@@ -1409,7 +1409,7 @@ def subp(args, data=None, rcs=None, env=None, capture=True, shell=False,
(out, err) = sp.communicate(data)
except OSError as e:
raise ProcessExecutionError(cmd=args, reason=e)
- rc = sp.returncode
+ rc = sp.returncode # pylint: disable=E1101
if rc not in rcs:
raise ProcessExecutionError(stdout=out, stderr=err,
exit_code=rc,