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