]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix AttributeError exception in autoscaling
authorSimon Pasquier <simon.pasquier@bull.net>
Wed, 4 Sep 2013 14:12:08 +0000 (16:12 +0200)
committerSimon Pasquier <simon.pasquier@bull.net>
Wed, 4 Sep 2013 15:58:58 +0000 (17:58 +0200)
Use the nested() method instead of directly accessing the _nested
attribute which isn't always initialized.

Fixes bug #1220737
Change-Id: I9f36d98e91d5175b354e423d7159e690b1e5b696

heat/engine/resources/autoscaling.py

index 12f791270fb49e71bc500cd061243b39e2b5061c..68eaeb3a65fd17ee8e71c0103046f96794bda8ac 100644 (file)
@@ -258,7 +258,7 @@ class InstanceGroup(stack_resource.StackResource):
         '''
         if name == 'InstanceList':
             ips = [inst.FnGetAtt('PublicIp')
-                   for inst in self._nested.resources.values()]
+                   for inst in self.nested().resources.values()]
             if ips:
                 return unicode(','.join(ips))