From 7ab49cdf935229eaee59787e452c20bee3801bf3 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Mon, 30 Nov 2020 13:00:42 +0100 Subject: [PATCH] fix check of executable path as it does not have to be full path --- pype/lib/applications.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pype/lib/applications.py b/pype/lib/applications.py index 86c640f2ed..fbf949c247 100644 --- a/pype/lib/applications.py +++ b/pype/lib/applications.py @@ -1,13 +1,12 @@ import os import sys -import re import getpass -import json import copy import platform import inspect import logging import subprocess +import distutils.spawn from abc import ABCMeta, abstractmethod import six @@ -649,7 +648,7 @@ class ApplicationExecutable: self.default_launch_args = default_launch_args def __iter__(self): - yield self.executable_path + yield distutils.spawn.find_executable(self.executable_path) for arg in self.default_launch_args: yield arg @@ -662,7 +661,7 @@ class ApplicationExecutable: def exists(self): if not self.executable_path: return False - return os.path.exists(self.executable_path) + return bool(distutils.spawn.find_executable(self.executable_path)) class Application: