From 185ca8f6fc5e69e989e473c8b1d066aa2d8e5cb1 Mon Sep 17 00:00:00 2001 From: Martin Kosek Date: Thu, 6 Oct 2011 08:22:08 +0200 Subject: Install tools crash when password prompt is interrupted When getpass.getpass() function is interrupted via CTRL+D, EOFError exception is thrown. Most of the install tools are not prepared for this event and crash with this exception. Make sure that it is handled properly and nice error message is printed. https://fedorahosted.org/freeipa/ticket/1916 --- install/tools/ipa-replica-prepare | 2 ++ 1 file changed, 2 insertions(+) (limited to 'install/tools/ipa-replica-prepare') diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare index 038fd69c9..eb93bc851 100755 --- a/install/tools/ipa-replica-prepare +++ b/install/tools/ipa-replica-prepare @@ -292,6 +292,8 @@ def main(): dirman_password = get_dirman_password() except KeyboardInterrupt: sys.exit(0) + if dirman_password is None: + sys.exit("\nDirectory Manager password required") # Try out the password try: -- cgit