From 8fc0452438ff76b57d59d4d0c36a6934894e0e51 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 10 Jun 2021 13:04:04 +0200 Subject: [PATCH] implemented UndefinedApplicationExecutable which is used if application does not have "executables" key --- openpype/lib/applications.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py index d82b7cd847..074c722a81 100644 --- a/openpype/lib/applications.py +++ b/openpype/lib/applications.py @@ -484,6 +484,27 @@ class ApplicationExecutable: return bool(self._realpath()) +class UndefinedApplicationExecutable(ApplicationExecutable): + """Some applications do not require executable path from settings. + + In that case this class is used to "fake" existing executable. + """ + def __init__(self): + pass + + def __str__(self): + return self.__class__.__name__ + + def __repr__(self): + return "<{}>".format(self.__class__.__name__) + + def as_args(self): + return [] + + def exists(self): + return True + + @six.add_metaclass(ABCMeta) class LaunchHook: """Abstract base class of launch hook."""