From bce64599f7fb96962d139a16616ca8163a6fced3 Mon Sep 17 00:00:00 2001 From: Hugo Lopes Tavares Date: Tue, 26 Aug 2014 18:21:26 -0400 Subject: [PATCH] Get region names in a backward compatible way --- 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 bdeaa53f1..1e903bcb9 100644 --- a/moto/ec2/models.py +++ b/moto/ec2/models.py @@ -1362,7 +1362,7 @@ class EC2Backend(BaseBackend, InstanceBackend, TagBackend, AmiBackend, ec2_backends = {} -for region_name in boto.regioninfo.load_regions()['ec2'].keys(): - ec2_backends[region_name] = EC2Backend() +for region in boto.ec2.regions(): + ec2_backends[region.name] = EC2Backend() ec2_backend = ec2_backends['us-east-1']