[Yt-svn] yt-commit r1654 - trunk/yt
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Wed Mar 3 13:39:21 PST 2010
Author: mturk
Date: Wed Mar 3 13:39:19 2010
New Revision: 1654
URL: http://yt.enzotools.org/changeset/1654
Log:
Adding a check to the progressbar to make the maxval == 1 if it's 0. This
should eliminate a bunch of problems, but also hide some others. The secret is
that if you are relying on the progressbar to report an empty iterable, bad
idea!
Modified:
trunk/yt/funcs.py
Modified: trunk/yt/funcs.py
==============================================================================
--- trunk/yt/funcs.py (original)
+++ trunk/yt/funcs.py Wed Mar 3 13:39:19 2010
@@ -304,6 +304,7 @@
This returns a progressbar of the most appropriate type, given a *title*
and a *maxval*.
"""
+ maxval = max(maxval, 1)
from yt.config import ytcfg
if ytcfg.getboolean("yt","inGui"):
if maxval > ytcfg.getint("reason","minpbar"): # Arbitrary number
More information about the yt-svn
mailing list