Handle errors in getUrlFd properly in Http.kernel.

This commit is contained in:
Jeremy Fincher 2003-12-02 11:31:27 +00:00
parent f370f1c469
commit bc56a8e3f2

View File

@ -313,7 +313,11 @@ class Http(callbacks.Privmsg):
Returns information about the current version of the Linux kernel. Returns information about the current version of the Linux kernel.
""" """
try: try:
fd = webutils.getUrlFd('http://www.kernel.org/kdist/finger_banner') try:
fd = webutils.getUrlFd('http://kernel.org/kdist/finger_banner')
except webutils.WebException, e:
irc.error(msg, str(e))
return
for line in fd: for line in fd:
(name, version) = line.split(':') (name, version) = line.split(':')
if 'latest stable' in name: if 'latest stable' in name: