Remove duplicate line lenghts from line unwrapping code.

This commit is contained in:
John Schember 2009-06-22 20:51:43 -04:00
parent 5b8ec44fc7
commit e426c9e60d

View File

@ -56,6 +56,7 @@ def line_length(raw, percent):
if not lengths: if not lengths:
return 0 return 0
lengths = list(set(lengths))
total = sum(lengths) total = sum(lengths)
avg = total / len(lengths) avg = total / len(lengths)
max_line = avg * 2 max_line = avg * 2