diff options
Diffstat (limited to 'ipaserver')
-rw-r--r-- | ipaserver/install/installutils.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index 6a6841a11..d17d53d1d 100644 --- a/ipaserver/install/installutils.py +++ b/ipaserver/install/installutils.py @@ -256,7 +256,13 @@ def get_password(prompt): if os.isatty(sys.stdin.fileno()): return getpass.getpass(prompt) else: - return sys.stdin.readline().rstrip() + sys.stdout.write(prompt) + sys.stdout.flush() + line = sys.stdin.readline() + if not line: + raise EOFError() + return line.rstrip() + def _read_password_default_validator(password): if len(password) < 8: |