network.py warning messages to stderr instead of stdout
Scott Baker [Tue, 6 Jan 2015 23:11:29 +0000 (15:11 -0800)]
planetstack/core/models/network.py

index 554bbf5..8b88865 100644 (file)
@@ -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)