Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade python version err msg #1809

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gsutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
# TODO: gsutil-beta: Distribute a pylint rc file.

ver = sys.version_info
if (ver.major == 2 and ver.minor < 7) or (ver.major == 3 and (ver.minor < 5 or ver.minor > 11)):
if (vermajor == 3 and verminor < 5) or (vermajor == 4):
NachE marked this conversation as resolved.
Show resolved Hide resolved
sys.exit(
"Error: gsutil requires Python version 2.7 or 3.5-3.11, but a different version is installed.\n"
"Error: gsutil requires Python version 3.5+ and <4, but a different version is installed.\n"
"You are currently running Python {}.{}\n"
"Follow the steps below to resolve this issue:\n"
"\t1. Switch to Python 3.5-3.11 using your Python version manager or install an appropriate version.\n"
"\t1. Switch to Python 3.5+ and <4 using your Python version manager or install an appropriate version.\n"
"\t2. If you are unsure how to manage Python versions, visit [https://cloud.google.com/storage/docs/gsutil_install#specifications] for detailed instructions.".format(ver.major, ver.minor)
)

Expand Down