From 4323b5af01fc2595148c467db7f2defc5a27d635 Mon Sep 17 00:00:00 2001 From: KiekerJan Date: Tue, 22 Jun 2021 22:50:06 +0200 Subject: [PATCH] simple fault catching email admin --- management/email_administrator.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/management/email_administrator.py b/management/email_administrator.py index 8ed6e2a8..37822622 100755 --- a/management/email_administrator.py +++ b/management/email_administrator.py @@ -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 == "":