Before you submit a bug report, please make sure that the issue still exists on the master branch!
Describe the bug
Calling namedqueries with zero defined queries gives divide by zero error
Software Versions
- Python version: 3.9.3
- Notmuch version: 0.31.4
- Alot version: git 1ade6de
To Reproduce
Steps to reproduce the behaviour:
- have no named queries defined in notmuch
- call namedqueries in alot
Error Log
ERROR:ui:Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/alot/ui.py", line 723, in apply_command
cmd.apply(self)
File "/usr/lib/python3.9/site-packages/alot/commands/globals.py", line 591, in apply
ui.buffer_open(buffers.NamedQueriesBuffer(ui, self.filtfun))
File "/usr/lib/python3.9/site-packages/alot/buffers/namedqueries.py", line 21, in __init__
self.rebuild()
File "/usr/lib/python3.9/site-packages/alot/buffers/namedqueries.py", line 55, in rebuild
self.querylist.set_focus(focusposition % len(self.queries))
ZeroDivisionError: integer division or modulo by zero
Before you submit a bug report, please make sure that the issue still exists on the master branch!
Describe the bug
Calling namedqueries with zero defined queries gives divide by zero error
Software Versions
To Reproduce
Steps to reproduce the behaviour:
Error Log