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-compat-manage | 2 ++ 1 file changed, 2 insertions(+) (limited to 'install/tools/ipa-compat-manage') diff --git a/install/tools/ipa-compat-manage b/install/tools/ipa-compat-manage index 07531fddc..898a797cf 100755 --- a/install/tools/ipa-compat-manage +++ b/install/tools/ipa-compat-manage @@ -100,6 +100,8 @@ def main(): dirman_password = pw.strip() else: dirman_password = get_dirman_password() + if dirman_password is None: + sys.exit("\nDirectory Manager password required") api.bootstrap(context='cli', debug=options.debug) api.finalize() -- cgit