From: Dominik Fleischmann Date: Thu, 28 May 2020 12:33:22 +0000 (+0200) Subject: Use default Previous Work Dir if there is none X-Git-Tag: release-v8.0-start^0 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=commitdiff_plain;h=e85ba44ca3988aae5932ced96787308c67f9be86;ds=sidebyside Use default Previous Work Dir if there is none When the folder where the working dir was is deleted an Exception is thrown. In that case a new default directory is defined. Change-Id: Ic0b3eb63625fc6cf6e90e9a77891c9958b6a9aee Signed-off-by: Dominik Fleischmann (cherry picked from commit cbf4b78798f1c6535fa7a7caaaa9235fb9dc8e8a) --- diff --git a/n2vc/k8s_juju_conn.py b/n2vc/k8s_juju_conn.py index 1f9c896..b2ef079 100644 --- a/n2vc/k8s_juju_conn.py +++ b/n2vc/k8s_juju_conn.py @@ -335,8 +335,10 @@ class K8sJujuConnector(K8sConnector): in the package> - """ - - previous_workdir = os.getcwd() + try: + previous_workdir = os.getcwd() + except FileNotFoundError: + previous_workdir = "/app/storage" bundle = kdu_model if kdu_model.startswith("cs:"):