We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f60547 commit 7f2d7bdCopy full SHA for 7f2d7bd
system/lib/pvr_tex_tool.py
@@ -16,18 +16,18 @@
16
# Note: a solution from
17
# https://stackoverflow.com/questions/11210104/check-if-a-program-exists-from-a-python-script
18
def _get_executable_path(*paths: str) -> str | None:
19
- from distutils.spawn import find_executable
+ from shutil import which
20
21
for path in paths:
22
- executable_path = find_executable(path)
+ executable_path = which(path)
23
if executable_path is not None:
24
return path
25
26
return None
27
28
29
_cli_name = "PVRTexToolCLI"
30
-_cli_path = _get_executable_path(_cli_name, f"{_main_dir}/system/bin/{_cli_name}")
+_cli_path = _get_executable_path(f"{_main_dir}/system/bin/{_cli_name}", _cli_name)
31
32
33
def can_use_pvr_tex_tool() -> bool:
0 commit comments