diff options
author | David Cantrell <dcantrell@redhat.com> | 2006-10-06 19:12:01 +0000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2006-10-06 19:12:01 +0000 |
commit | ad3686f81bf5f8f04f249ced6cf57dc71fca74f8 (patch) | |
tree | fc886b4bc1424b3e3f9c0419543abeb3c81cba69 /network.py | |
parent | 086b7a4f34eab0fa8ba300bdda08fdb045cf8336 (diff) | |
download | anaconda-ad3686f81bf5f8f04f249ced6cf57dc71fca74f8.tar.gz anaconda-ad3686f81bf5f8f04f249ced6cf57dc71fca74f8.tar.xz anaconda-ad3686f81bf5f8f04f249ced6cf57dc71fca74f8.zip |
* network.py (sanityCheckIPString): Change two >1 to >0 so that IP
addresses that look like 9.3.117.236 are validated (#209654).
Diffstat (limited to 'network.py')
-rw-r--r-- | network.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/network.py b/network.py index 2de8d556f..4ba464b02 100644 --- a/network.py +++ b/network.py @@ -88,10 +88,10 @@ def sanityCheckIPString(ip_string): if ip_string.strip() == "": raise IPMissing, _("IP address is missing.") - if ip_string.find(':') == -1 and ip_string.find('.') > 1: + if ip_string.find(':') == -1 and ip_string.find('.') > 0: family = socket.AF_INET errstr = _("IPv4 addresses must contain four numbers between 0 and 255, separated by periods.") - elif ip_string.find(':') > 1 and ip_string.find('.') == -1: + elif ip_string.find(':') > 0 and ip_string.find('.') == -1: family = socket.AF_INET6 errstr = _("'%s' is not a valid IPv6 address.") % ip_string else: |