Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
CSIT-474: CSIT doc auto-generation
[csit.git]
/
resources
/
libraries
/
python
/
topology.py
diff --git
a/resources/libraries/python/topology.py
b/resources/libraries/python/topology.py
index
0b40967
..
3c903e5
100644
(file)
--- a/
resources/libraries/python/topology.py
+++ b/
resources/libraries/python/topology.py
@@
-29,7
+29,10
@@
def load_topo_from_yaml():
:return: Nodes from loaded topology.
"""
:return: Nodes from loaded topology.
"""
- topo_path = BuiltIn().get_variable_value("${TOPOLOGY_PATH}")
+ try:
+ topo_path = BuiltIn().get_variable_value("${TOPOLOGY_PATH}")
+ except:
+ return ''
with open(topo_path) as work_file:
return load(work_file.read())['nodes']
with open(topo_path) as work_file:
return load(work_file.read())['nodes']
@@
-372,7
+375,7
@@
class Topology(object):
:return: Interface key.
:rtype: str
:return: Interface key.
:rtype: str
- :raises TypeError: If provided with invalid
arguments
.
+ :raises TypeError: If provided with invalid
interface argument
.
:raises RuntimeError: If the interface does not exist in topology.
"""
:raises RuntimeError: If the interface does not exist in topology.
"""