This is an automated email from the ASF dual-hosted git repository.

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 7b99930df5 GH-48853: [Release] Fix bytes to string comparison in 
download_rc_binaries.py (#48896)
7b99930df5 is described below

commit 7b99930df50bd1963ffdb5e23fe072914cbc50bb
Author: Shashwati Bhattacharyaa <[email protected]>
AuthorDate: Tue Jan 20 14:24:43 2026 +0530

    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 <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 dev/release/download_rc_binaries.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev/release/download_rc_binaries.py 
b/dev/release/download_rc_binaries.py
index 6a66b418d3..9bde70ed0d 100755
--- a/dev/release/download_rc_binaries.py
+++ b/dev/release/download_rc_binaries.py
@@ -136,7 +136,7 @@ class Downloader:
                     os.remove(dest_path)
                 except IOError:
                     pass
-                if "OpenSSL" not in stderr:
+                if b"OpenSSL" not in stderr:
                     # We assume curl has already retried on other errors.
                     break
             else:

Reply via email to