wkeeling/ratelimitingfilter

TypeError: unsupported operand type(s) for +=: 'int' and 'str'

Closed this issue · 2 comments

Hey,
When logging just an numeric value, and rate limiting kicks in, a TypeError is raised, as the library tries to concatenate an int and str.

eg.

for x in range(100):
    log.info(x)
  File "/home/mnuttall/.pyenv/versions/3.6.5/lib/python3.6/logging/__init__.py", line 718, in filter
    result = f.filter(record)
  File "/home/mnuttall/.local/share/virtualenvs/catalog-ilphx365/lib/python3.6/site-packages/ratelimitingfilter/ratelimitingfilter.py", line 74, in filter
    num=bucket.limited)
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

Otherwise, thanks for the lib 👍

@markns - thanks for raising.

Will release a fix asap.

This issue has been fixed in the latest release 1.2