Skip to content

Commit

Permalink
Change python print statements to functions
Browse files Browse the repository at this point in the history
This makes the scripts work well both under Python 2.x and 3.x
  • Loading branch information
yuvadm committed Sep 8, 2016
1 parent bafc901 commit ea59e72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/secret/pki/lib/pki-authority
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ array_exists () {

# Get an absolute path to a file
get_absolute_path () {
python -c 'import sys, os.path; print os.path.abspath(sys.argv[1])' "${1}"
python -c 'import sys, os.path; print(os.path.abspath(sys.argv[1]))' "${1}"
}

# Get a relative path to a file
get_relative_path () {
python -c 'import sys, os.path; print os.path.relpath(sys.argv[1], sys.argv[2])' "${1}" "${2:-$PWD}"
python -c 'import sys, os.path; print(os.path.relpath(sys.argv[1], sys.argv[2]))' "${1}" "${2:-$PWD}"
}

# Wrap dnsdomainname if it's not present (on MacOS X)
Expand Down

0 comments on commit ea59e72

Please sign in to comment.