From 4dadc7a005ca99aa5a14ac650e9aa187cea10619 Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Wed, 23 Nov 2016 09:42:29 +0100 Subject: CSIT-474: CSIT doc auto-generation - See resources/tools/doc_gen/README.rst for details Change-Id: Ie5704c93a41e456d65fcd6df2d9d8c96987deebb Signed-off-by: Tibor Frank --- resources/libraries/python/topology.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'resources/libraries/python/topology.py') 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'] -- cgit 1.2.3-korg