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() {