mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
Cast the record message to str() before extracting.
This commit is contained in:
@@ -23,7 +23,7 @@ void emit_function(bpy::object self, bpy::object record) {
|
||||
// There are other parameters that could be used, but this is minimal for
|
||||
// now (filename, line number, etc.).
|
||||
const int level = bpy::extract<int>(record.attr("levelno"));
|
||||
const std::wstring msg = bpy::extract<std::wstring>(record.attr("msg"));
|
||||
const std::wstring msg = bpy::extract<std::wstring>(bpy::str(record.attr("msg")));
|
||||
|
||||
switch (level) {
|
||||
case PyLogLevel::CRITICAL:
|
||||
|
||||
Reference in New Issue
Block a user