From 6dac2abd7b1cecfa8c823a1e35edc169625fb791 Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Thu, 9 Nov 2017 20:06:51 +0100 Subject: [PATCH] pep8: Fix E722 do not use bare except' --- bootstrapvz/plugins/ec2_launch/tasks.py | 2 +- tests/system/providers/docker/image.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bootstrapvz/plugins/ec2_launch/tasks.py b/bootstrapvz/plugins/ec2_launch/tasks.py index ec2d7b9..f7134e0 100644 --- a/bootstrapvz/plugins/ec2_launch/tasks.py +++ b/bootstrapvz/plugins/ec2_launch/tasks.py @@ -61,7 +61,7 @@ class PrintPublicIPAddress(Task): info._ec2['instance'] = conn.describe_instances(InstanceIds=[info._ec2['instance']['InstanceId']])['Reservations'][0]['Instances'][0] logger.info('******* EC2 IP ADDRESS: %s *******' % info._ec2['instance']['PublicIpAddress']) f.write(info._ec2['instance']['PublicIpAddress']) - except: + except Exception: logger.error('Could not get IP address for the instance') f.write('') diff --git a/tests/system/providers/docker/image.py b/tests/system/providers/docker/image.py index 9ef29d1..af4f1f8 100644 --- a/tests/system/providers/docker/image.py +++ b/tests/system/providers/docker/image.py @@ -14,7 +14,7 @@ class Image(object): self.container.create() try: self.container.start() - except: + except Exception: self.container.destroy() raise return self.container