Multiple bugs that couldn't be tested while the dict.org server was down have now been tested, found, and eradicated.

This commit is contained in:
Jeremy Fincher 2003-11-13 17:11:52 +00:00
parent b40a7e7757
commit 02b2eddd45
2 changed files with 3 additions and 8 deletions

View File

@ -23,12 +23,7 @@ version = '1.0'
def dequote(s):
"""Will remove single or double quotes from the start and end of a string
and return the result."""
quotechars = "'\""
while s and s[0] in quotechars:
s = s[1:]
while str and str[-1] in quotechars:
s = s[0:-1]
return s
return s.strip('\'"')
def enquote(s):
"""This function will put a string in double quotes, properly

View File

@ -85,7 +85,7 @@ class Dict(callbacks.Privmsg, plugins.Configurable):
"""
try:
conn = dictclient.Connection(self.configurables.get('server'))
dbs = conf.getdbdescs()
dbs = conn.getdbdescs().keys()
dbs.sort()
irc.reply(msg, utils.commaAndify(dbs))
except socket.timeout:
@ -98,7 +98,7 @@ class Dict(callbacks.Privmsg, plugins.Configurable):
"""
try:
conn = dictclient.Connection(self.configurables.get('server'))
dbs = conf.getdbdescs()
dbs = conn.getdbdescs().keys()
irc.reply(msg, random.choice(dbs))
except socket.timeout:
irc.error(msg, replyTimeout)