diff options
author | Tibor Frank <tifrank@cisco.com> | 2016-11-23 09:42:29 +0100 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2016-11-28 07:30:55 +0000 |
commit | 4dadc7a005ca99aa5a14ac650e9aa187cea10619 (patch) | |
tree | 2fc5ac6e8a875dfbf223c4789e24f3bab0b689bc /resources/libraries | |
parent | 4bda4f8b55b0d431b514663e8e90fccd97ad31d4 (diff) |
CSIT-474: CSIT doc auto-generation
- See resources/tools/doc_gen/README.rst for details
Change-Id: Ie5704c93a41e456d65fcd6df2d9d8c96987deebb
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r-- | resources/libraries/python/topology.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 5884ddf743..3c903e5c94 100644 --- 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. """ - 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'] |