diff options
author | Martin Nagy <mnagy@notas.(none)> | 2008-07-21 12:25:37 +0200 |
---|---|---|
committer | Rob Crittenden <rcrit@ipa.greyoak.com> | 2008-07-23 10:05:06 -0400 |
commit | f7ca405716b1ee8b92a940e07cd611f6b025795d (patch) | |
tree | 5246bd49daa8b72fe39f55d90b4280a8ec1d8b3e /ipa-server/ipa-install/ipa-replica-install | |
parent | 72a3114a01d0c67cf3b8faf7b28da93e8a6f2de3 (diff) | |
download | freeipa-f7ca405716b1ee8b92a940e07cd611f6b025795d.tar.gz freeipa-f7ca405716b1ee8b92a940e07cd611f6b025795d.tar.xz freeipa-f7ca405716b1ee8b92a940e07cd611f6b025795d.zip |
Wrap up the raw_input() to user_input() for convenience and uniformity.
Diffstat (limited to 'ipa-server/ipa-install/ipa-replica-install')
-rw-r--r-- | ipa-server/ipa-install/ipa-replica-install | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ipa-server/ipa-install/ipa-replica-install b/ipa-server/ipa-install/ipa-replica-install index 31fd4ccd6..ab66a8382 100644 --- a/ipa-server/ipa-install/ipa-replica-install +++ b/ipa-server/ipa-install/ipa-replica-install @@ -145,8 +145,7 @@ def check_dirsrv(): if serverids: print "" print "An existing Directory Server has been detected." - yesno = raw_input("Do you wish to remove it and create a new one? [no]: ") - if not yesno or yesno.lower()[0] != "y": + if not ipautil.user_input("Do you wish to remove it and create a new one?", False) print "" print "Only a single Directory Server instance is allowed on an IPA" print "server, the one used by IPA itself." @@ -189,12 +188,9 @@ def main(): if host != config.host_name: try: print "This replica was created for '%s' but this machine is named '%s'" % (host, config.host_name) - yesno = raw_input("This may cause problems. Continue? [Y/n]: ") - print "" - if not yesno or yesno.lower()[0] == "y": - pass - else: + if not ipautil.user_input("This may cause problems. Continue?", True) sys.exit(0) + print "" except KeyboardInterrupt: sys.exit(0) config.repl_password = ipautil.ipa_generate_password() |