Fix #7403 (ZeroDivisionError: float division)

This commit is contained in:
Kovid Goyal 2010-11-04 14:11:13 -06:00
parent ddc8cde9e0
commit e3fb323d86

View File

@ -144,7 +144,10 @@ class DocAnalysis(object):
# Normalize the histogram into percents
totalLines = len(self.lines)
if totalLines > 0:
h = [ float(count)/totalLines for count in hRaw ]
else:
h = []
#print "\nhRaw histogram lengths are: "+str(hRaw)
#print " percents are: "+str(h)+"\n"