mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
change pyblish MessageHandler emit method to convert messages to string at the moment of emmiting
This commit is contained in:
parent
80af34403b
commit
ecd498df85
1 changed files with 9 additions and 0 deletions
|
|
@ -67,6 +67,15 @@ def patched_discover(superclass):
|
||||||
@import_wrapper
|
@import_wrapper
|
||||||
def install():
|
def install():
|
||||||
"""Install Pype to Avalon."""
|
"""Install Pype to Avalon."""
|
||||||
|
from pyblish.lib import MessageHandler
|
||||||
|
|
||||||
|
def modified_emit(obj, record):
|
||||||
|
"""Method replacing `emit` in Pyblish's MessageHandler."""
|
||||||
|
record.msg = record.getMessage()
|
||||||
|
obj.records.append(record)
|
||||||
|
|
||||||
|
MessageHandler.emit = modified_emit
|
||||||
|
|
||||||
log.info("Registering global plug-ins..")
|
log.info("Registering global plug-ins..")
|
||||||
pyblish.register_plugin_path(PUBLISH_PATH)
|
pyblish.register_plugin_path(PUBLISH_PATH)
|
||||||
pyblish.register_discovery_filter(filter_pyblish_plugins)
|
pyblish.register_discovery_filter(filter_pyblish_plugins)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue