Notify fixes for running without __debug__
This commit is contained in:
parent
0f7c51ec80
commit
e527327b69
|
|
@ -38,8 +38,7 @@ class AsyncRequest(DirectObject):
|
|||
"""
|
||||
_asyncRequests = {}
|
||||
|
||||
if __debug__:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('AsyncRequest')
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('AsyncRequest')
|
||||
|
||||
def __init__(self, air, replyToChannelId = None,
|
||||
timeoutTime = ASYNC_REQUEST_DEFAULT_TIMEOUT_IN_SECONDS,
|
||||
|
|
|
|||
|
|
@ -2,13 +2,9 @@
|
|||
from DistributedObjectAI import DistributedObjectAI
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
|
||||
if __debug__:
|
||||
notify = directNotify.newCategory('DistributedObjectGlobalAI')
|
||||
|
||||
|
||||
class DistributedObjectGlobalAI(DistributedObjectAI):
|
||||
if __debug__:
|
||||
notify = notify
|
||||
notify = directNotify.newCategory('DistributedObjectGlobalAI')
|
||||
|
||||
doNotDeallocateChannel = 1
|
||||
isGlobalDistObj = 1
|
||||
|
|
@ -33,4 +29,4 @@ class DistributedObjectGlobalAI(DistributedObjectAI):
|
|||
except AttributeError:
|
||||
self.air.unregisterForChannel(self.doId)
|
||||
## self.air.removeDOFromTables(self)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,9 @@
|
|||
from DistributedObjectUD import DistributedObjectUD
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
|
||||
if __debug__:
|
||||
notify = directNotify.newCategory('DistributedObjectGlobalUD')
|
||||
|
||||
|
||||
class DistributedObjectGlobalUD(DistributedObjectUD):
|
||||
if __debug__:
|
||||
notify = notify
|
||||
notify = directNotify.newCategory('DistributedObjectGlobalUD')
|
||||
|
||||
doNotDeallocateChannel = 1
|
||||
isGlobalDistObj = 1
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ class NetMessenger(Messenger):
|
|||
are sent over the network and (possibly) handled (accepted) on a
|
||||
remote machine (server).
|
||||
"""
|
||||
if __debug__:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('NetMessenger')
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('NetMessenger')
|
||||
|
||||
def __init__(self, air, channels):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ class FourState:
|
|||
I found that this pattern repeated in several things I was
|
||||
working on, so this base class was created.
|
||||
"""
|
||||
if __debug__:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory(
|
||||
'FourState')
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('FourState')
|
||||
|
||||
def __init__(self, names, durations = [0, 1, None, 1, 1]):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ class FourStateAI:
|
|||
I found that this pattern repeated in several things I was
|
||||
working on, so this base class was created.
|
||||
"""
|
||||
if __debug__:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory(
|
||||
'FourStateAI')
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('FourStateAI')
|
||||
|
||||
def __init__(self, names, durations = [0, 1, None, 1, 1]):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ The port will need to be defined when the instance is inited.
|
|||
|
||||
import string, time, direct, inspect
|
||||
from operator import itemgetter
|
||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||
from direct.http import WebRequest
|
||||
from socket import gethostname
|
||||
from direct.task.Task import Task
|
||||
|
|
@ -22,9 +21,6 @@ if platform == 'win32':
|
|||
else:
|
||||
from linuxSystemInfo import SystemInformation
|
||||
|
||||
if __debug__:
|
||||
notify = directNotify.newCategory('AIWebInterface')
|
||||
|
||||
class aiWebServer(SystemInformation):
|
||||
def __init__(self, air, listenPort=8080):
|
||||
SystemInformation.__init__(self)
|
||||
|
|
|
|||
Loading…
Reference in New Issue