mirror of https://github.com/zulip/zulip.git
create_user: Try to read password file only when param specified.
The argument parser has default empty values set for the options `--password` and `--password-file`, and this causes the script to try and read a password file even when the argument was not provided.
This commit is contained in:
parent
9576ce589d
commit
b530c87d26
|
@ -1,4 +1,3 @@
|
|||
|
||||
import argparse
|
||||
import sys
|
||||
from typing import Any
|
||||
|
@ -77,10 +76,10 @@ parameters, or specify no parameters for interactive user creation.""")
|
|||
full_name = input("Full name: ")
|
||||
|
||||
try:
|
||||
if 'password' in options:
|
||||
pw = options['password']
|
||||
if 'password_file' in options:
|
||||
if options['password_file']:
|
||||
pw = open(options['password_file'], 'r').read()
|
||||
elif options['password']:
|
||||
pw = options['password']
|
||||
else:
|
||||
user_initial_password = initial_password(email)
|
||||
if user_initial_password is None:
|
||||
|
|
Loading…
Reference in New Issue