From: Andy Bavier Date: Thu, 19 Feb 2009 19:32:56 +0000 (+0000) Subject: Fix bug caused by netns being a string X-Git-Url: http://git.onelab.eu/?p=nodemanager-topo.git;a=commitdiff_plain;h=5da41057201cd8d236ce6623ca74061e68f28f98 Fix bug caused by netns being a string --- 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