summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2017-12-12 11:28:05 -0700
committerChad Smith <chad.smith@canonical.com>2017-12-12 11:28:05 -0700
commitb63ee73da874de68ff2019570e12df2a39d4626b (patch)
treee72ee301a1985a1907ea48a1b0835c7c2c44569b /tests
parent703241a3c50f2cfec21e7c8e90616c3378ebbea2 (diff)
downloadvyos-cloud-init-b63ee73da874de68ff2019570e12df2a39d4626b.tar.gz
vyos-cloud-init-b63ee73da874de68ff2019570e12df2a39d4626b.zip
tests: fix collect_console when not implemented
The exception was incorrectly creating a string and not a bytes object.
Diffstat (limited to 'tests')
-rw-r--r--tests/cloud_tests/collect.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cloud_tests/collect.py b/tests/cloud_tests/collect.py
index 4805cea1..bb722457 100644
--- a/tests/cloud_tests/collect.py
+++ b/tests/cloud_tests/collect.py
@@ -31,8 +31,8 @@ def collect_console(instance, base_dir):
LOG.debug('getting console log')
try:
data = instance.console_log()
- except NotImplementedError as e:
- data = 'Not Implemented: %s' % e
+ except NotImplementedError:
+ data = b'instance.console_log: not implemented'
with open(os.path.join(base_dir, 'console.log'), "wb") as fp:
fp.write(data)