mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
distributed: Fix broken reference to StackTrace when __debug__==False
This commit is contained in:
parent
9d05044a9f
commit
f062c64e9a
@ -4,7 +4,6 @@ from panda3d.core import *
|
|||||||
from panda3d.direct import *
|
from panda3d.direct import *
|
||||||
from direct.directnotify.DirectNotifyGlobal import directNotify
|
from direct.directnotify.DirectNotifyGlobal import directNotify
|
||||||
from direct.distributed.DistributedObjectBase import DistributedObjectBase
|
from direct.distributed.DistributedObjectBase import DistributedObjectBase
|
||||||
from direct.showbase.PythonUtil import StackTrace
|
|
||||||
#from PyDatagram import PyDatagram
|
#from PyDatagram import PyDatagram
|
||||||
#from PyDatagramIterator import PyDatagramIterator
|
#from PyDatagramIterator import PyDatagramIterator
|
||||||
|
|
||||||
@ -259,6 +258,9 @@ class DistributedObject(DistributedObjectBase):
|
|||||||
def _destroyDO(self):
|
def _destroyDO(self):
|
||||||
# after this is called, the object is no longer a DistributedObject
|
# after this is called, the object is no longer a DistributedObject
|
||||||
# but may still be used as a DelayDeleted object
|
# but may still be used as a DelayDeleted object
|
||||||
|
if __debug__:
|
||||||
|
# StackTrace is omitted in packed versions
|
||||||
|
from direct.showbase.PythonUtil import StackTrace
|
||||||
self.destroyDoStackTrace = StackTrace()
|
self.destroyDoStackTrace = StackTrace()
|
||||||
# check for leftover cached data that was not retrieved or flushed by this object
|
# check for leftover cached data that was not retrieved or flushed by this object
|
||||||
# this will catch typos in the data name in calls to get/setCachedData
|
# this will catch typos in the data name in calls to get/setCachedData
|
||||||
|
Loading…
x
Reference in New Issue
Block a user