strip whitespace from password
parent
18d52a49df
commit
18c40cbbb3
|
@ -90,7 +90,7 @@ def main():
|
||||||
encoding='UTF-8', capture_output=True,
|
encoding='UTF-8', capture_output=True,
|
||||||
shell=False, env=myenv )
|
shell=False, env=myenv )
|
||||||
if output.returncode != 0:
|
if output.returncode != 0:
|
||||||
print("{} exited {}".format(tootctlprog,-(output.returncode)),
|
print("{} exited {}".format(tootctlprog, output.returncode),
|
||||||
file=sys.stderr)
|
file=sys.stderr)
|
||||||
else:
|
else:
|
||||||
args.debug and print(f"user: {userid} created. rc: {output.returncode}" )
|
args.debug and print(f"user: {userid} created. rc: {output.returncode}" )
|
||||||
|
@ -101,7 +101,7 @@ def main():
|
||||||
sys.exit(3)
|
sys.exit(3)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
password=str(output.stdout).split(' ')[2]
|
password=str(output.stdout).strip().split(' ')[2]
|
||||||
except IndexError as e:
|
except IndexError as e:
|
||||||
print(f"Creating {userid} failed. Skipping:", e, file=sys.stderr)
|
print(f"Creating {userid} failed. Skipping:", e, file=sys.stderr)
|
||||||
done += 1
|
done += 1
|
||||||
|
|
Loading…
Reference in New Issue