diff options
author | Rob Crittenden <rcritten@redhat.com> | 2012-05-16 16:38:01 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-05-17 07:54:46 +0200 |
commit | eef056165f437e07c4a792d5545817a5517c59de (patch) | |
tree | d5662bd630ff91dc5128dd0ed77fe57ea524742d /ipaserver/install/installutils.py | |
parent | 02b942a72eb787cfca6ef52616cf038309f39c6c (diff) | |
download | freeipa-eef056165f437e07c4a792d5545817a5517c59de.tar.gz freeipa-eef056165f437e07c4a792d5545817a5517c59de.tar.xz freeipa-eef056165f437e07c4a792d5545817a5517c59de.zip |
Include more information when IP address is not local during installation.
Provide the IP address we resolved when displaying the exception.
Also handle the exception ourselves with sys.exit().
https://fedorahosted.org/freeipa/ticket/2654
Diffstat (limited to 'ipaserver/install/installutils.py')
-rw-r--r-- | ipaserver/install/installutils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipaserver/install/installutils.py b/ipaserver/install/installutils.py index 3e7ae41b..fc54b74b 100644 --- a/ipaserver/install/installutils.py +++ b/ipaserver/install/installutils.py @@ -574,7 +574,10 @@ def get_server_ip_address(host_name, fstore, unattended, options): else: ip = read_ip_address(host_name, fstore) elif len(hostaddr) == 1: - ip = ipautil.CheckedIPAddress(hostaddr[0], match_local=True) + try: + ip = ipautil.CheckedIPAddress(hostaddr[0], match_local=True) + except ValueError, e: + sys.exit("Invalid IP Address %s for %s: %s" % (hostaddr[0], host_name, unicode(e))) else: # hostname is not resolvable ip = options.ip_address |