#717 Quote get needs to be smarter


Quote get tries to get quotes with numbers such as 9e99 (which is a fn huge number!) or with potentially large hex numbers such as 0x24364. Additionally, if the number 9e999 is used, you get a float infinity to integer error:

ERROR 2012-01-01T23:46:12 supybot Uncaught exception in ['quote', 'get'].
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/supybot/callbacks.py", line 1199, in _callCommand
self.callCommand(command, irc, msg, args, kwargs)
File "/usr/local/lib/python2.7/dist-packages/supybot/utils/python.py", line 86, in g
f(self, *args,
File "/usr/local/lib/python2.7/dist-packages/supybot/callbacks.py", line 1185, in callCommand
method(irc, msg,
args, *kwargs)
File "/usr/local/lib/python2.7/dist-packages/supybot/commands.py", line 968, in newf
state = spec(irc, msg, args, stateAttrs={'cb': self, 'log': self.log})
File "/usr/local/lib/python2.7/dist-packages/supybot/commands.py", line 956, in call
context(irc, msg, args, state)
File "/usr/local/lib/python2.7/dist-packages/supybot/commands.py", line 747, in call
self.converter(irc, msg, args, state,
File "/usr/local/lib/python2.7/dist-packages/supybot/commands.py", line 275, in getId
getInt(irc, msg, args, state, type=type)
File "/usr/local/lib/python2.7/dist-packages/supybot/commands.py", line 228, in getInt
i = _int(args[0])
File "/usr/local/lib/python2.7/dist-packages/supybot/commands.py", line 222, in _int
return int(float(s))
OverflowError: cannot convert float infinity to integer


  • Valentin Lorentz

    I think this is an issue with all plugins using IDs.

  • Anonymous

    Anonymous - 2012-01-06

    I should have said it needs better boundary checking to term it correctly and yes, that didn't occur to me but seems very likely.

  • James McCoy

    James McCoy - 2013-08-24

    Thanks for the report. I've added OverflowError handling to the _int function.

  • James McCoy

    James McCoy - 2013-08-24
    • status: open --> closed
    • assigned_to: James McCoy

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks