]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Fixing lib/cr_tf/handler.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 6 Nov 2019 14:30:56 +0000 (15:30 +0100)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 6 Nov 2019 14:30:56 +0000 (15:30 +0100)
lib/cr_tf/handler.py

index 8a0b95c3c40d354d3029d3994769fe8f2b1c6f06..338eed2c97c3f365bacc5377f4322929668f872d 100644 (file)
@@ -61,7 +61,7 @@ from .terraform.disk import TerraformDisk
 
 from .xlate import XLATOR
 
-__version__ = '3.1.8'
+__version__ = '3.1.9'
 LOG = logging.getLogger(__name__)
 
 _ = XLATOR.gettext
@@ -2777,9 +2777,14 @@ class CreateTerraformHandler(BaseHandler):
     # -------------------------------------------------------------------------·
     def ensure_vsphere_folders(self):
 
+        vs_name = None
+        for vs_name in self.vsphere.keys():
+            break
+        vsphere = self.vsphere[vs_name]
+
         print()
         LOG.info(_("Ensuring existence of all necessary vSphere VM folders."))
-        self.vsphere.ensure_vm_folders(copy.copy(self.vsphere_folders))
+        vsphere.ensure_vm_folders(copy.copy(self.vsphere_folders))
 
     # -------------------------------------------------------------------------·
     def exec_terraform(self):