Clamp progress to be greater than zero

This commit is contained in:
Calen Pennington
2012-09-06 15:23:19 -04:00
parent 14eb160eea
commit 5ce516a3a0

View File

@@ -42,6 +42,9 @@ class Progress(object):
if a > b:
a = b
if a < 0:
a = 0
if b <= 0:
raise ValueError('fraction a/b = {0}/{1} must have b > 0'.format(a, b))