From 9da2517b776b68af36b651dd1ee08123e5b2376e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 31 Dec 2008 15:15:16 -0800 Subject: Just use socket.error since all the other exceptions inherit from it. --- mirrorselect | 5 ++--- 1 file 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: -- cgit v1.2.3-65-gdbad