aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/topology.py
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2016-12-15 10:52:33 +0100
committerTibor Frank <tifrank@cisco.com>2016-12-16 08:35:32 +0100
commitcf561a6e3d4c4fbd78ab6c9d0a9aa817bb3300fc (patch)
tree0b4d5d2dbda78223d77d76e237285396d42c868e /resources/libraries/python/topology.py
parent677ae40a2be6db9f49b19ada3c4299a8904f7784 (diff)
Pylint fixes
- Fix PyLint errors - Fix comments in touched python modules Change-Id: I26db2d292a41969cf38b9b0bdd49c4fb15349102 Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'resources/libraries/python/topology.py')
-rw-r--r--resources/libraries/python/topology.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/resources/libraries/python/topology.py b/resources/libraries/python/topology.py
index 0214cc9c02..8a591dfd14 100644
--- a/resources/libraries/python/topology.py
+++ b/resources/libraries/python/topology.py
@@ -18,7 +18,7 @@ from collections import Counter
from yaml import load
from robot.api import logger
-from robot.libraries.BuiltIn import BuiltIn
+from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError
from robot.api.deco import keyword
__all__ = ["DICT__nodes", 'Topology']
@@ -27,11 +27,11 @@ __all__ = ["DICT__nodes", 'Topology']
def load_topo_from_yaml():
"""Load topology from file defined in "${TOPOLOGY_PATH}" variable.
- :return: Nodes from loaded topology.
+ :returns: Nodes from loaded topology.
"""
try:
topo_path = BuiltIn().get_variable_value("${TOPOLOGY_PATH}")
- except:
+ except RobotNotRunningError:
return ''
with open(topo_path) as work_file:
@@ -312,7 +312,7 @@ class Topology(object):
try:
if isinstance(iface_key, basestring):
return node['interfaces'][iface_key].get('vpp_sw_index')
- #FIXME: use only iface_key, do not use integer
+ # TODO: use only iface_key, do not use integer
else:
return int(iface_key)
except (KeyError, ValueError):