mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
added safeRepr
This commit is contained in:
parent
6c57da8086
commit
8fb0f4306c
@ -1986,6 +1986,12 @@ def gcDebugOn():
|
||||
import gc
|
||||
return (gc.get_debug() & gc.DEBUG_SAVEALL) == gc.DEBUG_SAVEALL
|
||||
|
||||
def safeRepr(obj):
|
||||
try:
|
||||
return repr(obj)
|
||||
except:
|
||||
return '<** FAILED REPR OF %s **>' % obj.__class__.__name__
|
||||
|
||||
class ScratchPad:
|
||||
"""empty class to stick values onto"""
|
||||
def __init__(self, **kArgs):
|
||||
|
Loading…
x
Reference in New Issue
Block a user