Skip to content

Commit

Permalink
Hopefully fix out-of-order lines in cron emails
Browse files Browse the repository at this point in the history
  • Loading branch information
dseomn committed Dec 10, 2024
1 parent 0fb0c0f commit 1622442
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion salt/file/smartd/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ def main():
device, _, _ = line.partition(" ")
print(f"{device}:")
try:
subprocess.run(("smartctl", "--all", device), check=True)
subprocess.run(
("smartctl", "--all", device),
stderr=subprocess.STDOUT,
check=True,
)
except subprocess.CalledProcessError as e:
print(f"smartctl returned {e.returncode} for {device}")
print()
Expand Down

0 comments on commit 1622442

Please sign in to comment.