mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Made the error message in the face of problems connecting much prettier.
This commit is contained in:
parent
eb7b696ce9
commit
56117a0662
@ -62,9 +62,13 @@ class ThreadedFunCommands(callbacks.Privmsg):
|
||||
|
||||
def kernel(self, irc, msg, args):
|
||||
"""takes no arguments"""
|
||||
conn = telnetlib.Telnet('kernel.org', 79)
|
||||
conn.write('\n')
|
||||
text = conn.read_all()
|
||||
try:
|
||||
conn = telnetlib.Telnet('kernel.org', 79)
|
||||
conn.write('\n')
|
||||
text = conn.read_all()
|
||||
except socket.error, e:
|
||||
irc.error(msg, e.args[1])
|
||||
return
|
||||
stable = 'unkown'
|
||||
beta = 'unknown'
|
||||
for line in text.splitlines():
|
||||
|
Loading…
Reference in New Issue
Block a user