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):
|
def kernel(self, irc, msg, args):
|
||||||
"""takes no arguments"""
|
"""takes no arguments"""
|
||||||
conn = telnetlib.Telnet('kernel.org', 79)
|
try:
|
||||||
conn.write('\n')
|
conn = telnetlib.Telnet('kernel.org', 79)
|
||||||
text = conn.read_all()
|
conn.write('\n')
|
||||||
|
text = conn.read_all()
|
||||||
|
except socket.error, e:
|
||||||
|
irc.error(msg, e.args[1])
|
||||||
|
return
|
||||||
stable = 'unkown'
|
stable = 'unkown'
|
||||||
beta = 'unknown'
|
beta = 'unknown'
|
||||||
for line in text.splitlines():
|
for line in text.splitlines():
|
||||||
|
Loading…
Reference in New Issue
Block a user