diff --git a/igniter/update_window.py b/igniter/update_window.py index 2edb3f2c6b..a49a84cfee 100644 --- a/igniter/update_window.py +++ b/igniter/update_window.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """Progress window to show when OpenPype is updating/installing locally.""" import os -import sys from pathlib import Path from .update_thread import UpdateThread from Qt import QtCore, QtGui, QtWidgets # noqa @@ -12,8 +11,8 @@ def load_stylesheet(path: str = None) -> str: """Load css style sheet. Args: - path (str, optional): Path to stylesheet. If none, `stylesheet.css` from - current package's path is used. + path (str, optional): Path to stylesheet. If none, `stylesheet.css` + from current package's path is used. Returns: str: content of the stylesheet diff --git a/start.py b/start.py index ca48fdf3b7..27dc105394 100644 --- a/start.py +++ b/start.py @@ -397,6 +397,9 @@ def _process_arguments() -> tuple: # handle igniter # this is helper to run igniter before anything else if "igniter" in sys.argv: + if os.getenv("OPENPYPE_HEADLESS"): + _print("!!! Cannot open Igniter dialog in headless mode.") + sys.exit(1) import igniter return_code = igniter.open_dialog() @@ -444,6 +447,11 @@ def _determine_mongodb() -> str: if not openpype_mongo: _print("*** No DB connection string specified.") + if os.getenv("OPENPYPE_HEADLESS"): + _print("!!! Cannot open Igniter dialog in headless mode.") + _print( + "!!! Please use `OPENPYPE_MONGO` to specify server address.") + sys.exit(1) _print("--- launching setup UI ...") result = igniter.open_dialog() @@ -547,6 +555,9 @@ def _find_frozen_openpype(use_version: str = None, except IndexError: # no OpenPype version found, run Igniter and ask for them. _print('*** No OpenPype versions found.') + if os.getenv("OPENPYPE_HEADLESS"): + _print("!!! Cannot open Igniter dialog in headless mode.") + sys.exit(1) _print("--- launching setup UI ...") import igniter return_code = igniter.open_dialog()