Skip to content

Commit

Permalink
fix for moto 1.1.11+
Browse files Browse the repository at this point in the history
  • Loading branch information
tardyp committed Sep 27, 2017
1 parent 26d7c55 commit 9395443
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion master/buildbot/worker/ec2.py
Expand Up @@ -201,6 +201,7 @@ def __init__(self, name, password, instance_type, ami=None,
)

self.ec2 = self.session.resource('ec2')
self.ec2_client = self.session.client('ec2')

# Make a keypair
#
Expand Down Expand Up @@ -231,7 +232,7 @@ def __init__(self, name, password, instance_type, ami=None,
# create security group
if security_name:
try:
self.ec2.SecurityGroup(security_name).load()
self.ec2_client.describe_security_groups(GroupNames=[security_name])
except ClientError as e:
if 'InvalidGroup.NotFound' in str(e):
self.security_group = self.ec2.create_security_group(
Expand Down

0 comments on commit 9395443

Please sign in to comment.