X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Ftopology.py;h=3c903e5c94c1ac809f1d0307e3b3ec5fb54ca88f;hp=0b40967ef239a4943d899f43bd716af02e32ca37;hb=4dadc7a005ca99aa5a14ac650e9aa187cea10619;hpb=99519a54811a70b4ff2579baf46294507a8adfcb diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py index 0b40967ef2..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'] @@ -372,7 +375,7 @@ class Topology(object): :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. """