mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
pdb is not published, don't crash in production
This commit is contained in:
parent
6ad9fa6e07
commit
12d0fc68c0
@ -2187,9 +2187,17 @@ def appendStr(obj, st):
|
|||||||
appendedStr = None
|
appendedStr = None
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
import pdb
|
# convenience shortcuts for __dev__ debugging
|
||||||
setTrace = pdb.set_trace
|
# we don't have the __dev__ flag at this point
|
||||||
pm = pdb.pm
|
try:
|
||||||
|
import pdb
|
||||||
|
setTrace = pdb.set_trace
|
||||||
|
pm = pdb.pm
|
||||||
|
except:
|
||||||
|
# we're in production, there is no pdb module. assign these to something so that the
|
||||||
|
# __builtin__ exports will work
|
||||||
|
setTrace = None
|
||||||
|
pm = None
|
||||||
|
|
||||||
class ScratchPad:
|
class ScratchPad:
|
||||||
"""empty class to stick values onto"""
|
"""empty class to stick values onto"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user