Browse Source

python error message

David Rose 16 years ago
parent
commit
e0a4fcda2d
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/plugin/p3dPythonRun.cxx

+ 3 - 0
direct/src/plugin/p3dPythonRun.cxx

@@ -583,6 +583,9 @@ handle_pyobj_command(TiXmlElement *xcommand, bool needs_response,
         if (result != NULL) {
         if (result != NULL) {
           xresponse->LinkEndChild(pyobj_to_xml(result));
           xresponse->LinkEndChild(pyobj_to_xml(result));
           Py_DECREF(result);
           Py_DECREF(result);
+        } else {
+          // Print the Python error message if there was one.
+          PyErr_Print();
         }
         }
 
 
         Py_DECREF(obj);
         Py_DECREF(obj);