smtpdummy: allow to do unorthodox things

This commit is contained in:
Geoffrey Frogeye 2023-06-24 13:35:37 +02:00
parent 5ab08a4f77
commit 75d8c15def
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -170,7 +170,7 @@ Input arguments:
send("QUIT") # TODO Can loop if QUIT fails send("QUIT") # TODO Can loop if QUIT fails
sys.exit(1) sys.exit(1)
def send(command: str) -> None: def _send(command: str) -> None:
if not args.quiet: if not args.quiet:
print(colorama.Fore.BLUE + f"> {command}" + colorama.Fore.RESET) print(colorama.Fore.BLUE + f"> {command}" + colorama.Fore.RESET)
@ -182,6 +182,8 @@ Input arguments:
p.stdin.write(cmd) p.stdin.write(cmd)
p.stdin.flush() p.stdin.flush()
def send(command: str) -> None:
_send(command)
recv() recv()
# Transmission # Transmission