From fb76981ff20ed9740290af7a5411144b24bcc19f Mon Sep 17 00:00:00 2001 From: usmannasir Date: Sun, 9 Nov 2025 20:55:00 +0500 Subject: [PATCH] Fix Python 3.6 compatibility in binary verification Replace capture_output parameter with stdout/stderr PIPE for Python 3.6 compatibility. The capture_output parameter was added in Python 3.7 and causes errors on AlmaLinux 8 which uses Python 3.6. Changed subprocess.run() calls to use: - stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True Instead of: - capture_output=True, text=True --- install/installCyberPanel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 1ff6cb0d6..a5c6dca8e 100644 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -370,7 +370,7 @@ class InstallCyberPanel: # Check library dependencies command = f'ldd {binary_path}' - result = subprocess.run(command, shell=True, capture_output=True, text=True) + result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) if result.returncode != 0: InstallCyberPanel.stdOut("ERROR: Failed to check binary dependencies", 1) @@ -386,7 +386,7 @@ class InstallCyberPanel: # Try to run the binary with -v to check if it can execute command = f'{binary_path} -v' - result = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=5) + result = subprocess.run(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, timeout=5) if result.returncode != 0: InstallCyberPanel.stdOut("ERROR: Binary failed to execute", 1)