strip whitespace from password

main
Paco Hope 2022-11-27 08:41:12 -05:00
parent 18d52a49df
commit 18c40cbbb3
1 changed files with 2 additions and 2 deletions

View File

@ -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