aboutsummaryrefslogtreecommitdiffstats
path: root/tools/namespace.py
diff options
context:
space:
mode:
authorMaryam Tahhan <maryam.tahhan@intel.com>2016-08-09 07:48:00 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-09 07:48:00 +0000
commit18253fb2133ae1bd294689d297b0182481c174c2 (patch)
tree0171960e0273e407abd31cc25f7d5301056744f9 /tools/namespace.py
parentda059df422c839bb5d6393455a43c44e95873c73 (diff)
parent9d527a1ec357e159c08a2639ff4c63fcf97e9ba7 (diff)
Merge "namespace_bug: Initial creation of namespace fails"
Diffstat (limited to 'tools/namespace.py')
-rw-r--r--tools/namespace.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/namespace.py b/tools/namespace.py
index e6bcd819..9131398f 100644
--- a/tools/namespace.py
+++ b/tools/namespace.py
@@ -108,8 +108,8 @@ def get_system_namespace_list():
Return tuple of strings for namespaces on the system
:return: tuple of namespaces as string
"""
- return tuple(os.listdir('/var/run/netns'))
-
+ return tuple(os.listdir('/var/run/netns')) if os.path.exists(
+ '/var/run/netns') else tuple()
def get_vsperf_namespace_list():
"""