From 1bbf7028b46dd1ffb775f9e7e282f54bb25abcad Mon Sep 17 00:00:00 2001 From: Frej Drejhammar Date: Wed, 27 Dec 2023 12:52:26 +0100 Subject: [PATCH] Don't look for a Python 2 interpreter Don't look for a Python 2 interpreter as Python is no longer supported. If there is a Python 2 available and it had the Mercurial modules available, hg-fast-export would use it and fail to import `importlib.machinery`. This is probably the cause of #314. Closes #314. --- hg-fast-export.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hg-fast-export.sh b/hg-fast-export.sh index fd0ff53..be52c5d 100755 --- a/hg-fast-export.sh +++ b/hg-fast-export.sh @@ -29,7 +29,7 @@ GFI_OPTS="" if [ -z "${PYTHON}" ]; then # $PYTHON is not set, so we try to find a working python with mercurial: - for python_cmd in python2 python python3; do + for python_cmd in python3 python; do if command -v $python_cmd > /dev/null; then $python_cmd -c 'from mercurial.scmutil import revsymbol' 2> /dev/null if [ $? -eq 0 ]; then