Browse Source

__dev__ -> __debug__

Josh Wilson 17 years ago
parent
commit
cf6cb4897f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      direct/src/gui/DirectGuiBase.py

+ 4 - 1
direct/src/gui/DirectGuiBase.py

@@ -652,7 +652,10 @@ def toggleGuiGridSnap():
 def setGuiGridSpacing(spacing):
 def setGuiGridSpacing(spacing):
     DirectGuiWidget.gridSpacing = spacing
     DirectGuiWidget.gridSpacing = spacing
 
 
-if config.GetBool('record-gui-creation-stack', __dev__):
+# this should trigger off of __dev__, but it's not available at this point.
+# __debug__ works because the production client is not __debug__ and the
+# production AI doesn't create any GUI.
+if config.GetBool('record-gui-creation-stack', __debug__):
     # this will help track down the code that created DirectGui objects
     # this will help track down the code that created DirectGui objects
     # call obj.printCreationStackTrace() to figure out what code created it
     # call obj.printCreationStackTrace() to figure out what code created it
     DirectGuiBase = recordCreationStackStr(DirectGuiBase)
     DirectGuiBase = recordCreationStackStr(DirectGuiBase)