implemented UndefinedApplicationExecutable which is used if application does not have "executables" key

This commit is contained in:
iLLiCiTiT 2021-06-10 13:04:04 +02:00
parent b4d081b7ee
commit 8fc0452438

View file

@ -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."""