diff options
author | Mike Fulbright <msf@redhat.com> | 2002-07-26 00:29:22 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2002-07-26 00:29:22 +0000 |
commit | 480e8f0e6befc8630d01b8b7953b5437dc01b579 (patch) | |
tree | bbf0793bbf31791a82b1b3e830827479c6fab7a7 /iw | |
parent | 47f0a01befc9d0a08ceddad761d9fad20c653308 (diff) | |
download | anaconda-480e8f0e6befc8630d01b8b7953b5437dc01b579.tar.gz anaconda-480e8f0e6befc8630d01b8b7953b5437dc01b579.tar.xz anaconda-480e8f0e6befc8630d01b8b7953b5437dc01b579.zip |
fix for bug #68233
Diffstat (limited to 'iw')
-rw-r--r-- | iw/firewall_gui.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/iw/firewall_gui.py b/iw/firewall_gui.py index 3df419851..e7abda4c5 100644 --- a/iw/firewall_gui.py +++ b/iw/firewall_gui.py @@ -84,11 +84,15 @@ class FirewallWindow (InstallWindow): #- if there's a colon in the token, it's valid if string.index(token,':'): parts = string.split(token, ':') - portnum = int(parts[0]) + try: + portnum = string.atoi(parts[0]) + except: + portnum = None + if len(parts) > 2: # more than one colon bad_token_found = 1 bad_token = token - elif portnum < 1 or portnum > 65535: + elif portnum is not None and (portnum < 1 or portnum > 65535): bad_token_found = 1 bad_token = token else: @@ -105,8 +109,12 @@ class FirewallWindow (InstallWindow): except: if token != "": try: - portnum = int(token) - if portnum < 1 or portnum > 65535: + try: + portnum = string.atoi(token) + except: + portnum = None + + if portnum is not None and (portnum < 1 or portnum > 65535): bad_token_found = 1 bad_token = token else: |