From 0e316d8fc3ad93abac78378290bd9dfdc85e7a3c Mon Sep 17 00:00:00 2001 From: Jon Haddad Date: Thu, 5 Dec 2013 16:45:18 -0800 Subject: [PATCH] fixed spot instances creation --- moto/ec2/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/ec2/models.py b/moto/ec2/models.py index 2a760dd72..6121c338a 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -540,12 +540,12 @@ class SpotInstanceRequest(object): self.security_groups = [] if security_groups: for group_name in security_groups: - group = ec2_backend.get_security_group_from_name(group_name) + group = ec2_backend.get_security_group_from_name(group_name, None) if group: self.security_groups.append(group) else: # If not security groups, add the default - default_group = ec2_backend.get_security_group_from_name("default") + default_group = ec2_backend.get_security_group_from_name("default", None) self.security_groups.append(default_group)