From 9d527a1ec357e159c08a2639ff4c63fcf97e9ba7 Mon Sep 17 00:00:00 2001 From: Christian Trautman Date: Sat, 6 Aug 2016 21:34:22 -0400 Subject: namespace_bug: Initial creation of namespace fails Initial creation of namespace fails because var/run/netns does not exist. JIRA: VSPERF-366 Change-Id: I02e5aef52e1675f303405b69c7461ca6482903af Signed-off-by: Christian Trautman --- tools/namespace.py | 4 ++-- 1 file 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(): """ -- cgit 1.2.3-korg