From 162244224e2976c960928676093833da872a048c Mon Sep 17 00:00:00 2001 From: David Mandelberg Date: Tue, 10 Dec 2024 16:27:40 -0500 Subject: [PATCH] Hopefully fix out-of-order lines in cron emails --- salt/file/smartd/report.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/salt/file/smartd/report.py b/salt/file/smartd/report.py index 8abf8be..3a5e948 100644 --- a/salt/file/smartd/report.py +++ b/salt/file/smartd/report.py @@ -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()