projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug 1049: Raise exception if model does not exist when destroying a model
[osm/N2VC.git]
/
n2vc
/
n2vc_juju_conn.py
diff --git
a/n2vc/n2vc_juju_conn.py
b/n2vc/n2vc_juju_conn.py
index
dbd904c
..
0485e69
100644
(file)
--- a/
n2vc/n2vc_juju_conn.py
+++ b/
n2vc/n2vc_juju_conn.py
@@
-1288,6
+1288,12
@@
class N2VCJujuConnector(N2VCConnector):
total_timeout = 3600
model = await self._juju_get_model(model_name=model_name)
total_timeout = 3600
model = await self._juju_get_model(model_name=model_name)
+
+ if not model:
+ raise N2VCException(
+ message="Model {} does not exist".format(model_name)
+ )
+
uuid = model.info.uuid
# destroy applications
uuid = model.info.uuid
# destroy applications