exit on error

main
Paco Hope 2022-11-25 23:26:52 -05:00
parent 3fbe7de41c
commit 14e56801fe
1 changed files with 2 additions and 0 deletions

View File

@ -54,10 +54,12 @@ def main():
mailbox = args.email.split('@')[0] mailbox = args.email.split('@')[0]
except IndexError: except IndexError:
print("ERROR: This doesn't look like an email address: \"{}\"".format(args.email)) print("ERROR: This doesn't look like an email address: \"{}\"".format(args.email))
sys.exit(1)
try: try:
emailDomain = args.email.split('@')[1] emailDomain = args.email.split('@')[1]
except IndexError: except IndexError:
print("ERROR: This doesn't look like an email address: \"{}\"".format(args.email)) print("ERROR: This doesn't look like an email address: \"{}\"".format(args.email))
sys.exit(1)
done = 0 done = 0
while( done < args.num ): while( done < args.num ):