Browse Source

smtpdummy: Better error handling

master
Geoffrey Frogeye 3 months ago
parent
commit
72e37e0921
  1. 5
      config/scripts/smtpdummy

5
config/scripts/smtpdummy

@ -141,7 +141,10 @@ Input arguments:
next = True
while next:
line = p.stdout.readline()
code = int(line[:3])
try:
code = int(line[:3])
except ValueError:
raise ValueError(f"Could not parse line: '{line.decode()}'")
success = code < 400
color = colorama.Fore.GREEN if success else colorama.Fore.RED
if not args.quiet:

Loading…
Cancel
Save