Fix for UnboundLocalError in kernel command.

This commit is contained in:
Jeremy Fincher 2003-08-19 16:49:26 +00:00
parent 08c9a9c7c6
commit fa518894cc
1 changed files with 2 additions and 4 deletions

View File

@ -31,10 +31,6 @@
"""
Provides fun/useless commands that require threads.
Commands include:
dns
kernel
"""
from baseplugin import *
@ -69,6 +65,8 @@ class ThreadedFunCommands(callbacks.Privmsg):
conn = telnetlib.Telnet('kernel.org', 79)
conn.write('\n')
text = conn.read_all()
stable = 'unkown'
beta = 'unknown'
for line in text.splitlines():
(name, version) = line.split(':')
if 'latest stable' in name: