Ejemplo n.º 1
0
    def get_tool_abspath(self):
        if not self.tool_path:
            return None

        abspath = os.path.abspath(os.path.expanduser(self.tool_path))
        if os.path.exists(abspath):
            return abspath

        executables = which(self.tool_path)
        if executables:
            return executables[0]
Ejemplo n.º 2
0
    def get_tool_abspath(self):
        if not self.tool_path:
            return None

        abspath = os.path.abspath(os.path.expanduser(self.tool_path))
        if os.path.exists(abspath):
            return abspath

        executables = which(self.tool_path)
        if executables:
            return executables[0]