From df78e496b7acc17b9552e66df153e7d31f910537 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 26 Nov 2019 13:30:00 +0100 Subject: [PATCH 1/2] Error out rather than call python on the perl script --- scripts/config.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config.pl b/scripts/config.pl index 95e31913a2..a303d2f866 100755 --- a/scripts/config.pl +++ b/scripts/config.pl @@ -19,7 +19,7 @@ ## This file is part of Mbed TLS (https://tls.mbed.org) my $py = $0; -$py =~ s/\.pl$/.py/; +$py =~ s/\.pl$/.py/ or die "Unable to determine the name of the Python script"; exec 'python3', $py, @ARGV; print STDERR "$0: python3: $!\n"; exec 'python', $py, @ARGV; From 987e271b16ab66bc1b610399b7d5a2bf32158104 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 26 Nov 2019 13:30:16 +0100 Subject: [PATCH 2/2] If python3 fails, make it clear that this isn't fatal --- scripts/config.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/config.pl b/scripts/config.pl index a303d2f866..c836b37af5 100755 --- a/scripts/config.pl +++ b/scripts/config.pl @@ -21,7 +21,7 @@ my $py = $0; $py =~ s/\.pl$/.py/ or die "Unable to determine the name of the Python script"; exec 'python3', $py, @ARGV; -print STDERR "$0: python3: $!\n"; +print STDERR "$0: python3: $!. Trying python instead.\n"; exec 'python', $py, @ARGV; print STDERR "$0: python: $!\n"; exit 127;