Make sure the urllib2 file gets closed properly in pgpkey

This commit is contained in:
James Vega 2003-09-08 17:35:24 +00:00
parent cc07bc1272
commit 89d5f7a088

View File

@ -404,9 +404,10 @@ class Http(callbacks.Privmsg):
line = fd.readline()
if len(pgpkeys) == 0:
irc.reply(msg, 'No results found for %s.' % search)
fd.close()
else:
irc.reply(msg, 'Matches found for %s: %s' % (search, pgpkeys[:-4]))
fd.close()
fd.close()
Class = Http