mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-02-28 01:10:44 +01:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user