Prevent PyQt from using its buggy exception logging by making it look like we're using custom exception handling.

This commit is contained in:
AnyOldName3
2019-07-15 20:04:44 +01:00
parent ac5540ba87
commit 19dcdd95c0
+2 -1
View File
@@ -1372,7 +1372,8 @@ bool PythonRunner::initPython(const QString &pythonPath)
mainNamespace["moprivate"] = bpy::import("moprivate");
bpy::import("site");
bpy::exec("sys.stdout = moprivate.PrintWrapper()\n"
"sys.stderr = moprivate.ErrWrapper()\n",
"sys.stderr = moprivate.ErrWrapper()\n"
"sys.excepthook = lambda x, y, z: sys.__excepthook__(x, y, z)",
mainNamespace);
return true;