Missing Timeout on Multiple Subprocess Calls #9
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Several subprocess calls lack timeouts (potential hangs):
Line 577: subprocess.run(['dmesg', '-T', '--level=err,warn'], ...) ✓ Has timeout
Line 1145: subprocess.run(['smartctl', '-i', device], ...) ❌ Missing timeout
Line 1440: subprocess.run(['smartctl', '-A', '-H', '-l', 'error'...], ...) ✓ Has timeout
Add timeouts to all subprocess calls:
result = subprocess.run(['smartctl', '-i', device],
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
text=True, timeout=30) # Add this