fix: Resolve ValueError in subprocess.run for stderr redirection
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
2
main.py
2
main.py
@@ -28,7 +28,7 @@ def run_pls_command(playlist_id):
|
|||||||
"""Runs the docker exec command and returns combined stdout/stderr."""
|
"""Runs the docker exec command and returns combined stdout/stderr."""
|
||||||
cmd = ['docker', 'exec', 'navidrome-navidrome-1', '/app/navidrome', 'pls', '-l', 'error', '-np', playlist_id]
|
cmd = ['docker', 'exec', 'navidrome-navidrome-1', '/app/navidrome', 'pls', '-l', 'error', '-np', playlist_id]
|
||||||
try:
|
try:
|
||||||
result = subprocess.run(cmd, capture_output=True, text=True, check=False, stderr=subprocess.STDOUT)
|
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, check=False)
|
||||||
return result.stdout
|
return result.stdout
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
logging.error("Command 'docker' not found. Please ensure it is installed and in your PATH.")
|
logging.error("Command 'docker' not found. Please ensure it is installed and in your PATH.")
|
||||||
|
|||||||
Reference in New Issue
Block a user