def which(self, command, path=None, exts=None): for parent in (path or self._search_path): c = mozpath.abspath(mozpath.join(parent, command)) for candidate in (c, ensure_exe_extension(c)): if self.imported_os.path.exists(candidate): return candidate raise WhichError()
def which(self, command): for parent in self._search_path: path = mozpath.join(parent, command) if self.OS.path.exists(path): return path raise WhichError()
def which(self, command, path=None): for parent in (path or self._search_path): candidate = mozpath.join(parent, command) if self.OS.path.exists(candidate): return candidate raise WhichError()