Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroDivisionError in ProgressBar #62

Closed
rlintu opened this issue Apr 9, 2015 · 3 comments
Closed

ZeroDivisionError in ProgressBar #62

rlintu opened this issue Apr 9, 2015 · 3 comments

Comments

@rlintu
Copy link

rlintu commented Apr 9, 2015

If the length of the collection is zero then there is ZeroDivisionError.
I faced this issue in db_mgmt_cpe_other_dictionary.py when updating
the database.
On line 67 it is checked that list(collections) is not empty.
It seems, however, that the length may be still be 0.
I do not know whether the proper correction is to add testing of
zero length. Anyway, it removed the ZeroDivisionError.

Br,
Raino

@PidgeyL
Copy link
Member

PidgeyL commented Apr 9, 2015

Thanks for the remark, I will fix this shortly

@adulau
Copy link
Member

adulau commented Apr 9, 2015

I fixed with the check when the list is None but indeed if the value is 0 we still have the division per zero. I suppose this only happens for the initial import when comparing an empty cpeother collection.

@PidgeyL
Copy link
Member

PidgeyL commented Apr 9, 2015

I fixed it, uploading it now

@adulau adulau closed this as completed in 886704c Apr 9, 2015
mdeous pushed a commit to mdeous/cve-search that referenced this issue Jun 11, 2015
pombredanne referenced this issue in pombredanne/cve-search Sep 18, 2015
Bugfix + Performance Increase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants