Resolve distutils deprecation warning
The distutils package is deprecated and slated for removal in
Python 3.12. Let's use shutil.which which is also recomended
by PEP 632: https://peps.python.org/pep-0632/#migration-advice
Closes-Bug: #2009229
Change-Id: Ibb2a9731449e765c4a56952a9f02679e9618778b
diff --git a/tools/worlddump.py b/tools/worlddump.py
index e292173..aadd33b 100755
--- a/tools/worlddump.py
+++ b/tools/worlddump.py
@@ -19,7 +19,6 @@
import argparse
import datetime
-from distutils import spawn
import fnmatch
import io
import os
@@ -76,7 +75,7 @@
def _find_cmd(cmd):
- if not spawn.find_executable(cmd):
+ if not shutil.which(cmd):
print("*** %s not found: skipping" % cmd)
return False
return True