Update cli_commands.py

import qt related stuff only when using qt
This commit is contained in:
Ondřej Samohel 2024-03-25 11:08:47 +01:00 committed by GitHub
parent 27900e5cc9
commit da31aa2359
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,8 +67,6 @@ class Commands:
install_ayon_plugins,
get_global_context,
)
from ayon_core.tools.utils.host_tools import show_publish
from ayon_core.tools.utils.lib import qt_app_context
# Register target and host
import pyblish.api
@ -134,6 +132,8 @@ class Commands:
print(plugin)
if gui:
from ayon_core.tools.utils.host_tools import show_publish
from ayon_core.tools.utils.lib import qt_app_context
with qt_app_context():
show_publish()
else: