You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A more robust condition using sys.version_info is better since you can use any compiled python in any path. A little hackish, but it works instead of comparing to python2.7string: if subprocess.call([python_bin, "-c", "import sys; sys.exit(0) if sys.version_info.major == 2 else sys.exit(1)"]) == 0
@idgserpro sounds like a plan. Would you prepare a pull request?
Alternatively checking python --version would be a way to check. But executing code with an exit is probably most save.
I thought about the PR but can't sign the Contributor's Agreement and this package it's in plone namespace. 😢 That's why it's opened as an issue with a suggestion.
Right now, the logic to use
virtualenv
instead ofvenv
is a bit fragile, since it tries to detect python 2 by comparing if the bin ispython2.7
plonecli/plonecli/cli.py
Line 120 in b478678
A more robust condition using
sys.version_info
is better since you can use any compiled python in any path. A little hackish, but it works instead of comparing topython2.7
string:if subprocess.call([python_bin, "-c", "import sys; sys.exit(0) if sys.version_info.major == 2 else sys.exit(1)"]) == 0
@jensens
The text was updated successfully, but these errors were encountered: