nerdfonts: fix wrong attribute name in error message (#364463)
[NixPkgs.git] / pkgs / tools / admin / google-cloud-sdk / gsutil-revert-version-constraint.patch
blob616e904cae4fe77e72d8d8bda1ca8c58c65541d7
1 diff --git a/platform/gsutil/gsutil.py b/platform/gsutil/gsutil.py
2 index 30b8a5ac..a02f0ba5 100755
3 --- a/platform/gsutil/gsutil.py
4 +++ b/platform/gsutil/gsutil.py
5 @@ -27,14 +27,8 @@ import warnings
6 # TODO: gsutil-beta: Distribute a pylint rc file.
8 ver = sys.version_info
9 -if (ver.major == 2 and ver.minor < 7) or (ver.major == 3 and (ver.minor < 5 or ver.minor > 11)):
10 - sys.exit(
11 - "Error: gsutil requires Python version 2.7 or 3.5-3.11, but a different version is installed.\n"
12 - "You are currently running Python {}.{}\n"
13 - "Follow the steps below to resolve this issue:\n"
14 - "\t1. Switch to Python 3.5-3.11 using your Python version manager or install an appropriate version.\n"
15 - "\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)
16 - )
17 +if (ver.major == 2 and ver.minor < 7) or (ver.major == 3 and ver.minor < 5):
18 + sys.exit('gsutil requires python 2.7 or 3.5+.')
20 # setup a string to load the correct httplib2
21 if sys.version_info.major == 2: