Fix divisionbyzero in python3
svn: r20889
This commit is contained in:
parent
97fbe91426
commit
34c7d6baee
@ -35,7 +35,8 @@ from __future__ import division
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import time
|
import time
|
||||||
import collections
|
import collections
|
||||||
|
import logging
|
||||||
|
_LOG = logging.getLogger(".gen")
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Callback updater
|
# Callback updater
|
||||||
@ -71,6 +72,9 @@ class UpdateCallback(object):
|
|||||||
|
|
||||||
def set_total(self, total):
|
def set_total(self, total):
|
||||||
self.total = total
|
self.total = total
|
||||||
|
if self.total == 0:
|
||||||
|
_LOG.warning('UpdateCallback with total == 0 created')
|
||||||
|
self.total = 1
|
||||||
|
|
||||||
def update_empty(self, count=None):
|
def update_empty(self, count=None):
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user