We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7899cbe commit b12bb67Copy full SHA for b12bb67
autotest/gcore/vsicurl.py
@@ -26,9 +26,12 @@ def curl_version():
26
actual_version = [0, 0, 0]
27
for build_info_item in gdal.VersionInfo("BUILD_INFO").strip().split("\n"):
28
if build_info_item.startswith("CURL_VERSION="):
29
- actual_version = [
30
- int(x) for x in build_info_item[len("CURL_VERSION=") :].split(".")
31
- ]
+ curl_version = build_info_item[len("CURL_VERSION=") :]
+ # Remove potential -rcX postfix.
+ dashrc_pos = curl_version.find("-rc")
32
+ if dashrc_pos > 0:
33
+ curl_version = curl_version[0:dashrc_pos]
34
+ actual_version = [int(x) for x in curl_version.split(".")]
35
return actual_version
36
37
0 commit comments