From df63498a915735a90684cf2c446ea371ead89eae Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Fri, 13 Aug 2021 18:17:52 +0200 Subject: [PATCH] common: Replace the use of python2 with python3 We want to move to python3 eventually so update the script snippet. We can be sure that python3 is installed, because portage already requires it. --- common.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.sh b/common.sh index a97c560fe8..6f6aa00435 100644 --- a/common.sh +++ b/common.sh @@ -843,8 +843,8 @@ reinterpret_path_for_chroot() { # Get the relative path between two locations. Handy for printing paths to # the user that will usually make sense both inside and outside the chroot. relpath() { - local py='import sys, os; print os.path.relpath(sys.argv[1], sys.argv[2])' - python2 -c "${py}" "${1}" "${2:-.}" + local py='import sys, os; print(os.path.relpath(sys.argv[1], sys.argv[2]))' + python3 -c "${py}" "${1}" "${2:-.}" } enable_strict_sudo() {