mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
show tkinter message box if validation crashes
This commit is contained in:
parent
cda626d76f
commit
7fe3fd1d11
1 changed files with 17 additions and 1 deletions
18
start.py
18
start.py
|
|
@ -359,7 +359,23 @@ def is_tool(name):
|
|||
|
||||
def _startup_validations():
|
||||
"""Validations before OpenPype starts."""
|
||||
_validate_thirdparty_binaries()
|
||||
try:
|
||||
_validate_thirdparty_binaries()
|
||||
except Exception as exc:
|
||||
if os.environ.get("OPENPYPE_HEADLESS_MODE"):
|
||||
raise
|
||||
|
||||
from tkinter import Tk
|
||||
from tkinter.messagebox import showerror
|
||||
|
||||
root = Tk()
|
||||
root.withdraw()
|
||||
showerror(
|
||||
"Startup validations didn't pass",
|
||||
str(exc)
|
||||
)
|
||||
root.destroy()
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def _validate_thirdparty_binaries():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue