According to pysqlite 0.50.0 you can have a fractional number of items in a db

:(
This commit is contained in:
James Vega 2003-12-02 18:58:28 +00:00
parent 1ff44651a9
commit 9277d4113f
1 changed files with 1 additions and 1 deletions

View File

@ -533,7 +533,7 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
cursor.execute("""SELECT created_by, count(key) FROM factoids
GROUP BY created_by
ORDER BY count(key) DESC LIMIT %s""", limit)
L = ['%s (%s)' % (ircdb.users.getUser(t[0]).name, t[1])
L = ['%s (%s)' % (ircdb.users.getUser(t[0]).name, int(t[1]))
for t in cursor.fetchall()]
return 'Most prolific %s: %s' % \
(utils.pluralize(len(L), 'author'), utils.commaAndify(L))