NiltonVolpato / python-progressbar

Text progress bar library for Python
Other
412 stars 105 forks source link

Names with % break it #68

Open kittenswolf opened 4 years ago

kittenswolf commented 4 years ago

>>> x = Bar("%", max=100)
>>> x.next()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/kittenswolf/.local/lib/python3.6/site-packages/progress/__init__.py", line 120, in next
    self.update()
  File "/home/kittenswolf/.local/lib/python3.6/site-packages/progress/bar.py", line 36, in update
    message = self.message % self
ValueError: incomplete format```
NiltonVolpato commented 4 years ago

Yeah, maybe we should escape the input. A workaround is using "%%" for now