better debug print logic

This commit is contained in:
Joe Shochet 2005-03-10 00:47:04 +00:00
parent 49e4024ed3
commit b04c601d20

View File

@ -15,8 +15,6 @@ from direct.showbase import DirectObject
from PyDatagram import PyDatagram from PyDatagram import PyDatagram
#from PyDatagramIterator import PyDatagramIterator #from PyDatagramIterator import PyDatagramIterator
WantInterestPrintout = 0
class DoInterestManager(DirectObject.DirectObject): class DoInterestManager(DirectObject.DirectObject):
""" """
Top level Interest Manager Top level Interest Manager
@ -24,12 +22,10 @@ class DoInterestManager(DirectObject.DirectObject):
if __debug__: if __debug__:
notify = DirectNotifyGlobal.directNotify.newCategory("DoInterestManager") notify = DirectNotifyGlobal.directNotify.newCategory("DoInterestManager")
_interestIdAssign = 1; _interestIdAssign = 1;
_interestIdScopes = 100; _interestIdScopes = 100;
_interests = {} _interests = {}
def __init__(self): def __init__(self):
assert self.notify.debugCall() assert self.notify.debugCall()
DirectObject.DirectObject.__init__(self) DirectObject.DirectObject.__init__(self)
@ -130,11 +126,10 @@ class DoInterestManager(DirectObject.DirectObject):
if __debug__: if __debug__:
def printInterests(self): def printInterests(self):
if not WantInterestPrintout:
return 1
""" """
Part of the new otp-server code. Part of the new otp-server code.
""" """
if self.notify.getDebug():
print "*********************** Interest Sets **************" print "*********************** Interest Sets **************"
for i in DoInterestManager._interests.keys(): for i in DoInterestManager._interests.keys():
print "Interest ID:%s, Description=%s Scope=%s Event=%s Mode=%s"%( print "Interest ID:%s, Description=%s Scope=%s Event=%s Mode=%s"%(