diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py index 1251e1a718..4a254f7c2f 100644 --- a/openpype/hosts/nuke/api/lib.py +++ b/openpype/hosts/nuke/api/lib.py @@ -3162,5 +3162,4 @@ def is_headless(): Returns: bool: headless """ - headless = QtWidgets.QApplication.instance() is None - return headless + return QtWidgets.QApplication.instance() is None diff --git a/openpype/hosts/nuke/api/workio.py b/openpype/hosts/nuke/api/workio.py index 12f069a386..4ec0766599 100644 --- a/openpype/hosts/nuke/api/workio.py +++ b/openpype/hosts/nuke/api/workio.py @@ -26,8 +26,7 @@ def open_file(filepath): # To remain in the same window, we have to clear the script and read # in the contents of the workfile. nuke.scriptClear() - headless = is_headless() - if not headless: + if not is_headless(): autosave = nuke.toNode("preferences")["AutoSaveName"].evaluate() autosave_prmpt = "Autosave detected.\nWould you like to load the autosave file?" # noqa if os.path.isfile(autosave) and nuke.ask(autosave_prmpt):