aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gmail.com>2008-12-31 15:15:16 -0800
committerZac Medico <zmedico@gmail.com>2008-12-31 15:15:16 -0800
commit9da2517b776b68af36b651dd1ee08123e5b2376e (patch)
tree5316b19734954423626b2e57d03388738011c20b /mirrorselect
parentremove python2.6 hardcoding in shebang (diff)
downloadmirrorselect-9da2517b776b68af36b651dd1ee08123e5b2376e.tar.gz
mirrorselect-9da2517b776b68af36b651dd1ee08123e5b2376e.tar.bz2
mirrorselect-9da2517b776b68af36b651dd1ee08123e5b2376e.zip
Just use socket.error since all the other exceptions inherit from it.
Diffstat (limited to 'mirrorselect')
-rwxr-xr-xmirrorselect5
1 files changed, 2 insertions, 3 deletions
diff --git a/mirrorselect b/mirrorselect
index d612962..1a3b5f9 100755
--- a/mirrorselect
+++ b/mirrorselect
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2.6
"""
Mirrorselect 1.x written by Colin Kingsley (tercel@gentoo.org)
@@ -14,7 +14,6 @@ import urllib
import urlparse
from HTMLParser import HTMLParser
from optparse import IndentedHelpFormatter, OptionParser
-socket_error = (socket.error, socket.herror, socket.gaierror, socket.timeout)
class Output:
"""Handles text output. Only prints messages with level <= verbosity.
@@ -477,7 +476,7 @@ class Deep(object):
ips.append(ip)
finally:
signal.alarm(0)
- except socket_error, e:
+ except socket.error, e:
output.write('deeptime(): dns error for host %s: %s\n' % \
(url_parts.hostname, e), 2)
except TimeoutException: