Karaage-Cluster/karaage — Issue #158: Usage divide by zero issue
Author: sorrison
Created: 2012-02-27 23:37:37+00:00
State: open
Labels: Bug

Traceback (most recent call last):

File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)

File "/usr/lib/pymodules/python2.6/karaage/usage/views.py", line 178, in institute_usage
quota_percent = p_usage / (available_usage * quota.quota) * 10000

File "/usr/lib/python2.6/decimal.py", line 1247, in __truediv__
return context._raise_error(DivisionUndefined, '0 / 0')

File "/usr/lib/python2.6/decimal.py", line 3778, in _raise_error
raise error(explanation)

InvalidOperation: 0 / 0