From 6c2314475072e15a4ac0d6f3a787a43fbc9ba193 Mon Sep 17 00:00:00 2001 From: jem Date: Wed, 4 Mar 2020 09:27:46 +0100 Subject: [PATCH] minor fixes --- build.py | 2 +- src/main/python/ddadevops/aws_mixin.py | 9 +++++---- src/main/python/ddadevops/dda_pallet_mixin.py | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build.py b/build.py index 3eb09de..2d6e42e 100644 --- a/build.py +++ b/build.py @@ -27,7 +27,7 @@ use_plugin("python.distutils") default_task = "publish" name = "ddadevops" -version = "0.4.0.dev12" +version = "0.4.0.dev13" summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud" description = __doc__ authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")] diff --git a/src/main/python/ddadevops/aws_mixin.py b/src/main/python/ddadevops/aws_mixin.py index 5dea461..c82208d 100644 --- a/src/main/python/ddadevops/aws_mixin.py +++ b/src/main/python/ddadevops/aws_mixin.py @@ -27,10 +27,11 @@ class AwsMixin(DevopsTerraformBuild): def init_client(self): tf = Terraform(working_dir=self.build_path()) tf.init(backend_config=self.backend_config()) - try: - tf.workspace('select', slef.stage) - except: - tf.workspace('new', self.stage) + if self.use_workspace: + try: + tf.workspace('select', slef.stage) + except: + tf.workspace('new', self.stage) return tf def plan(self): diff --git a/src/main/python/ddadevops/dda_pallet_mixin.py b/src/main/python/ddadevops/dda_pallet_mixin.py index 1b40e83..98ab6c2 100644 --- a/src/main/python/ddadevops/dda_pallet_mixin.py +++ b/src/main/python/ddadevops/dda_pallet_mixin.py @@ -1,4 +1,5 @@ from string import Template +from subprocess import run from .python_util import * from .devops_build import DevopsBuild