mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 14:11:07 +02:00
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.
This commit is contained in:
parent
bd5c0c6a0e
commit
df63498a91
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user