Revert "Fix Bug 2234 Upgrading Python libjuju to 2.9.42.1"
[osm/N2VC.git] / n2vc / n2vc_juju_conn.py
index 261b4b8..ba8b84b 100644 (file)
@@ -829,6 +829,7 @@ class N2VCJujuConnector(N2VCConnector):
                                 model_name=model, total_timeout=total_timeout
                             )
                     except Exception as e:
+                        self.log.error(f"Error deleting namespace {namespace} : {e}")
                         raise N2VCException(
                             message="Error deleting namespace {} : {}".format(
                                 namespace, e
@@ -839,6 +840,9 @@ class N2VCJujuConnector(N2VCConnector):
                         message="only ns_id is permitted to delete yet",
                         bad_args=["namespace"],
                     )
+        except Exception as e:
+            self.log.error(f"Error deleting namespace {namespace} : {e}")
+            raise e
         finally:
             self.delete_namespace_locks.pop(namespace)
         self.log.info("Namespace {} deleted".format(namespace))
@@ -1113,7 +1117,6 @@ class N2VCJujuConnector(N2VCConnector):
             )
 
         try:
-
             await libjuju.upgrade_charm(
                 application_name=application_name,
                 path=path,
@@ -1178,7 +1181,6 @@ class N2VCJujuConnector(N2VCConnector):
             )
 
     def _write_ee_id_db(self, db_dict: dict, ee_id: str):
-
         # write ee_id to database: _admin.deployed.VCA.x
         try:
             the_table = db_dict["collection"]