Skip to content

Commit

Permalink
Use old school sys.version_info for python v2.6 and older.
Browse files Browse the repository at this point in the history
  • Loading branch information
fboender committed Dec 19, 2018
1 parent 1cb04b5 commit 68ba5fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ansible-cmdb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ fi


# Verify Python version
PY_VMAJOR=$($PY_BIN -c "import sys; print(sys.version_info.major)")
PY_VMINOR=$($PY_BIN -c "import sys; print(sys.version_info.minor)")
PY_VMAJOR=$($PY_BIN -c "import sys; print(sys.version_info[0])")
PY_VMINOR=$($PY_BIN -c "import sys; print(sys.version_info[1])")

if [ "$PY_VMAJOR" -eq 2 -a "$PY_VMINOR" -lt 7 ]; then
echo "Python v2.7 or v3.0 or higher is required" >&2
Expand Down

0 comments on commit 68ba5fe

Please sign in to comment.