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