Skip to content

Commit 7b99930

Browse files
author
Shashwati Bhattacharyaa
authored
GH-48853: [Release] Fix bytes to string comparison in download_rc_binaries.py (#48896)
### Rationale for this change The download_rc_binaries.py script fails with a `TypeError` when a download fails and it tries to check if the error is related to OpenSSL. ### What changes are included in this PR? `subprocess.Popen().communicate()` returns bytes objects, but the code was comparing `stderr` (bytes) with a string `"OpenSSL"`. Changed to use bytes literal `b"OpenSSL"` for proper comparison. ### Are these changes tested? The fix is straightforward - using bytes literal instead of string literal for comparison with bytes object. ### Are there any user-facing changes? No. Closes #48853 * GitHub Issue: #48853 Authored-by: Shashwati <shashwatibhattacaharya21.2@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
1 parent 97c656b commit 7b99930

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dev/release/download_rc_binaries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _download_url(self, url, dest_path, *, extra_args=None):
136136
os.remove(dest_path)
137137
except IOError:
138138
pass
139-
if "OpenSSL" not in stderr:
139+
if b"OpenSSL" not in stderr:
140140
# We assume curl has already retried on other errors.
141141
break
142142
else:

0 commit comments

Comments
 (0)