Fix divisionbyzero in python3

svn: r20889
This commit is contained in:
Benny Malengier 2012-12-30 17:32:52 +00:00
parent 97fbe91426
commit 34c7d6baee

View File

@ -35,7 +35,8 @@ from __future__ import division
#-------------------------------------------------------------------------
import time
import collections
import logging
_LOG = logging.getLogger(".gen")
#-------------------------------------------------------------------------
#
# Callback updater
@ -71,6 +72,9 @@ class UpdateCallback(object):
def set_total(self, total):
self.total = total
if self.total == 0:
_LOG.warning('UpdateCallback with total == 0 created')
self.total = 1
def update_empty(self, count=None):
pass