simple fault catching email admin

This commit is contained in:
KiekerJan 2021-06-22 22:50:06 +02:00
parent ca5fb3c2e0
commit 4323b5af01
1 changed files with 5 additions and 1 deletions

View File

@ -25,7 +25,11 @@ subject = sys.argv[1]
admin_addr = "administrator@" + env['PRIMARY_HOSTNAME']
# Read in STDIN.
content = sys.stdin.read().strip()
try:
content = sys.stdin.read().strip()
except:
print("error occured while cleaning input text")
sys.exit(1)
# If there's nothing coming in, just exit.
if content == "":