示例#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]
示例#2
0
文件: tsung.py 项目: saurabh-a/taurus
    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]