require commands to return 0

This commit is contained in:
2021-07-13 17:16:16 +02:00
parent 3a3810ec74
commit 1b822b8251

View File

@@ -132,7 +132,7 @@ def conf2top(top):
print("Warning: Error opening", top["file"], file=sys.stderr) print("Warning: Error opening", top["file"], file=sys.stderr)
if "command" in top: if "command" in top:
body = subprocess.run(top["command"], shell=True, text=True, capture_output=True).stdout body = subprocess.run(top["command"], shell=True, text=True, capture_output=True, check=True).stdout
return Top(top["title"], sender, body, protostub) return Top(top["title"], sender, body, protostub)