From 18c40cbbb373d86bcf46b1a3cf08f8d89fb8efbf Mon Sep 17 00:00:00 2001 From: Paco Hope Date: Sun, 27 Nov 2022 08:41:12 -0500 Subject: [PATCH] strip whitespace from password --- server-util/make-users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server-util/make-users.py b/server-util/make-users.py index 03ae183..b198a75 100644 --- a/server-util/make-users.py +++ b/server-util/make-users.py @@ -90,7 +90,7 @@ def main(): encoding='UTF-8', capture_output=True, shell=False, env=myenv ) if output.returncode != 0: - print("{} exited {}".format(tootctlprog,-(output.returncode)), + print("{} exited {}".format(tootctlprog, output.returncode), file=sys.stderr) else: args.debug and print(f"user: {userid} created. rc: {output.returncode}" ) @@ -101,7 +101,7 @@ def main(): sys.exit(3) try: - password=str(output.stdout).split(' ')[2] + password=str(output.stdout).strip().split(' ')[2] except IndexError as e: print(f"Creating {userid} failed. Skipping:", e, file=sys.stderr) done += 1