From: Scott Baker Date: Tue, 6 Jan 2015 23:11:29 +0000 (-0800) Subject: network.py warning messages to stderr instead of stdout X-Git-Url: http://git.onelab.eu/?p=plstackapi.git;a=commitdiff_plain;h=732ea39421a10b1f74340a65d7f5182821a8fb9b network.py warning messages to stderr instead of stdout --- diff --git a/planetstack/core/models/network.py b/planetstack/core/models/network.py index 554bbf5..8b88865 100644 --- a/planetstack/core/models/network.py +++ b/planetstack/core/models/network.py @@ -1,5 +1,6 @@ import os import socket +import sys from django.db import models from core.models import PlCoreBase, Site, Slice, Sliver, Controller from core.models import ControllerLinkManager,ControllerLinkDeletionManager @@ -84,13 +85,13 @@ class NetworkTemplate(PlCoreBase): # somehow these got set wrong inside of the live database. Remove this # code after all is well... if (self.topology_kind=="BigSwitch"): - print "XXX warning: topology_kind invalid case" + print >> sys.stderr, "XXX warning: topology_kind invalid case" self.topology_kind="bigswitch" elif (self.topology_kind=="Physical"): - print "XXX warning: topology_kind invalid case" + print >> sys.stderr, "XXX warning: topology_kind invalid case" self.topology_kind="physical" elif (self.topology_kind=="Custom"): - print "XXX warning: topology_kind invalid case" + print >> sys.stderr, "XXX warning: topology_kind invalid case" self.toplogy_kind="custom" def __unicode__(self): return u'%s' % (self.name)