summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/platforms/ec2/instance.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cloud_tests/platforms/ec2/instance.py')
-rw-r--r--tests/cloud_tests/platforms/ec2/instance.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/cloud_tests/platforms/ec2/instance.py b/tests/cloud_tests/platforms/ec2/instance.py
index ab6037b1..d2e84047 100644
--- a/tests/cloud_tests/platforms/ec2/instance.py
+++ b/tests/cloud_tests/platforms/ec2/instance.py
@@ -49,11 +49,11 @@ class EC2Instance(Instance):
# OutputBytes comes from platform._decode_console_output_as_bytes
response = self.instance.console_output()
return response['OutputBytes']
- except KeyError:
+ except KeyError as e:
if 'Output' in response:
msg = ("'OutputBytes' did not exist in console_output() but "
"'Output' did: %s..." % response['Output'][0:128])
- raise util.PlatformError('console_log', msg)
+ raise util.PlatformError('console_log', msg) from e
return ('No Console Output [%s]' % self.instance).encode()
def destroy(self):