X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2F__init__.py;h=95bd104faf73f075ba1173a6acd339d9d20efbac;hb=28cebd157f9d39920d0480232e7c361716ca45bb;hp=ad0997b4f816e1c0aa5ecc563f02250cc5bd816c;hpb=95e2195f941fb3b9921a3bf6c92e6109710a8e70;p=tools%2Fsat.git diff --git a/src/__init__.py b/src/__init__.py index ad0997b..95bd104 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -55,8 +55,13 @@ KNOWNFAILURE_STATUS = "KF" TIMEOUT_STATUS = "TIMEOUT" class SatException(Exception): - """rename Exception Class""" - pass + """sat exception class""" + def message(self, arg): + if sys.version_info[0] >= 3: + # message method is not available for python 3.8+ + return super().msg(arg) + else: + return super(SatException,self).message(arg) def ensure_path_exists(p): """Create a path if not existing @@ -230,6 +235,23 @@ def get_launcher_name(config): return launcher_name +def get_launcher_exe(config): + """\ + Returns the name of exe defined in profile section. + + :param config Config: The global Config instance. + :return: The name of the exe to use in launcher. + :rtype: str + """ + check_config_has_application(config) + if 'profile' in config.APPLICATION and 'exe' in config.APPLICATION.profile: + exe_name = config.APPLICATION.profile.exe + else: + exe_name = None + + return exe_name + + def get_log_path(config): """\ Returns the path of the logs.