diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-04-19 21:30:08 -0600 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2018-04-19 21:30:08 -0600 |
commit | 1081962eacf2814fea6f4fa3255c530de14e4a24 (patch) | |
tree | 5025c02d1215a9c0716c28499f1a9c3ee4c3e35b /tests/cloud_tests/platforms/lxd | |
parent | 53f3f551f8e5d3d86c428bc51161a7842dfe06f9 (diff) | |
download | vyos-cloud-init-1081962eacf2814fea6f4fa3255c530de14e4a24.tar.gz vyos-cloud-init-1081962eacf2814fea6f4fa3255c530de14e4a24.zip |
pylint: pay attention to unused variable warnings.
This enables warnings produced by pylint for unused variables (W0612),
and fixes the existing errors.
Diffstat (limited to 'tests/cloud_tests/platforms/lxd')
-rw-r--r-- | tests/cloud_tests/platforms/lxd/instance.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/cloud_tests/platforms/lxd/instance.py b/tests/cloud_tests/platforms/lxd/instance.py index 0d957bca..1c17c781 100644 --- a/tests/cloud_tests/platforms/lxd/instance.py +++ b/tests/cloud_tests/platforms/lxd/instance.py @@ -152,9 +152,8 @@ class LXDInstance(Instance): return fp.read() try: - stdout, stderr = subp( - ['lxc', 'console', '--show-log', self.name], decode=False) - return stdout + return subp(['lxc', 'console', '--show-log', self.name], + decode=False)[0] except ProcessExecutionError as e: raise PlatformError( "console log", @@ -214,11 +213,10 @@ def _has_proper_console_support(): reason = "LXD Driver version not 3.x+ (%s)" % dver else: try: - stdout, stderr = subp(['lxc', 'console', '--help'], - decode=False) + stdout = subp(['lxc', 'console', '--help'], decode=False)[0] if not (b'console' in stdout and b'log' in stdout): reason = "no '--log' in lxc console --help" - except ProcessExecutionError as e: + except ProcessExecutionError: reason = "no 'console' command in lxc client" if reason: |