Просмотр исходного кода

drose - for some reason, indenting the function within if __debug__ prevents compiling for publish

Asad M. Zaman 22 лет назад
Родитель
Сommit
d7b13b6b7a
1 измененных файлов с 4 добавлено и 6 удалено
  1. 4 6
      direct/src/showbase/InputState.py

+ 4 - 6
direct/src/showbase/InputState.py

@@ -62,9 +62,7 @@ class InputState(DirectObject.DirectObject):
         #assert(self.debugPrint("isSet(name=%s)"%(name)))
         return self.state.get(name)
     
-    if __debug__:
-        def debugPrint(self, message):
-            """for debugging"""
-            return self.notify.debug(
-                    "%s (%s) %s"%(id(self), len(self.state), message))
-    
+    def debugPrint(self, message):
+        """for debugging"""
+        return self.notify.debug(
+            "%s (%s) %s"%(id(self), len(self.state), message))