From 5da41057201cd8d236ce6623ca74061e68f28f98 Mon Sep 17 00:00:00 2001 From: Andy Bavier Date: Thu, 19 Feb 2009 19:32:56 +0000 Subject: [PATCH] Fix bug caused by netns being a string --- topo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/topo.py b/topo.py index fb9e33c..8174dbf 100755 --- a/topo.py +++ b/topo.py @@ -125,7 +125,7 @@ def writeConf(slicename, value): f.write("%s\n" % value) f.close() STATUS="OFF" - if int(value) >= 1: + if value: STATUS="ON" logger.log("%s: network namespace %s\n" % (slicename, STATUS)) @@ -150,8 +150,8 @@ def GetSlivers(data): for attribute in sliver['attributes']: attrs[attribute['name']] = attribute['value'] if 'netns' in attrs: - writeConf(sliver['name'], attrs['netns']) - netns = attrs['netns'] + netns = int(attrs['netns']) + writeConf(sliver['name'], netns) else: netns = 0 -- 2.43.0