mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Handle errors in getUrlFd properly in Http.kernel.
This commit is contained in:
parent
f370f1c469
commit
bc56a8e3f2
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user