mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Prevent PyQt from using its buggy exception logging by making it look like we're using custom exception handling.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user