XLS exporter crashes if the number of tests is 0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PlainBox (Toolkit) |
Fix Released
|
Low
|
Zygmunt Krynicki |
Bug Description
Steps to reproduce:
1) Run checkbox-cli --new-ui
2) Select the client-cert whitelist
3) Deselect all tests and re-select the category "Informational Tests"
Expected results:
The run finishes without errors
Actual results:
The XLS exporter crashes:
CRITICAL plainbox.crashes: Executable 'checkbox' invoked with Namespace(
Traceback (most recent call last):
File "/usr/lib/
return self.dispatch_
File "/usr/lib/
return ns.command.
File "/usr/lib/
self.
File "/usr/lib/
return self.do_
File "/usr/lib/
self.
File "/usr/lib/
exporter.
File "/usr/lib/
self.
File "/usr/lib/
self.total_pass / self.total * 100,
ZeroDivisionError: division by zero
Traceback (most recent call last):
File "/usr/bin/
load_
File "/usr/lib/
CheckBoxNGT
File "/usr/lib/
return self.dispatch_
File "/usr/lib/
return self.dispatch_
File "/usr/lib/
return ns.command.
File "/usr/lib/
self.
File "/usr/lib/
return self.do_
File "/usr/lib/
self.
File "/usr/lib/
exporter.
File "/usr/lib/
self.
File "/usr/lib/
self.total_pass / self.total * 100,
ZeroDivisionError: division by zero
Exception ignored in: <bound method Workbook.__del__ of <xlsxwriter.
Traceback (most recent call last):
File "/usr/lib/
self.close()
File "/usr/lib/
self.
File "/usr/lib/
xlsx_
File "/usr/lib/
zinfo.
ValueError: I/O operation on closed file
Exception ignored in: <bound method ZipFile.__del__ of <zipfile.ZipFile object at 0x7fd0ecac7d68>>
Related branches
- Sylvain Pineau (community): Approve
- Zygmunt Krynicki (community): Needs Fixing
-
Diff: 54 lines (+14/-9)1 file modifiedplainbox/plainbox/impl/exporter/xlsx.py (+14/-9)
Changed in plainbox: | |
status: | New → In Progress |
assignee: | nobody → Zygmunt Krynicki (zkrynicki) |
milestone: | none → 0.6 |
Changed in plainbox: | |
status: | In Progress → Fix Committed |
importance: | Undecided → Low |
Changed in plainbox: | |
status: | Fix Committed → Fix Released |