add MODEL_NAME variable to determine model

This commit is contained in:
Chris MacNaughton
2018-06-20 17:04:11 +02:00
parent 15539c981c
commit 063aadd4df
+5 -2
View File
@@ -51,8 +51,11 @@ def get_juju_model():
# Check the environment
CURRENT_MODEL = os.environ["JUJU_MODEL"]
except KeyError:
# If unset connect get the current active model
CURRENT_MODEL = get_current_model()
try:
CURRENT_MODEL = os.environ["MODEL_NAME"]:
except KeyError:
# If unset connect get the current active model
CURRENT_MODEL = get_current_model()
return CURRENT_MODEL