diff options
author | Benji York <benji@benjiyork.com> | 2011-10-03 16:07:03 -0400 |
---|---|---|
committer | Benji York <benji@benjiyork.com> | 2011-10-03 16:07:03 -0400 |
commit | 409fcfa99e9a82833fd00b65072e4e742716ae7b (patch) | |
tree | fd3aa314352fe0baee710d0de57ed4ff8baff096 /pygments | |
parent | f83a828ec5ff775cd313213385d4bce06efda8e6 (diff) | |
download | pygments-409fcfa99e9a82833fd00b65072e4e742716ae7b.tar.gz |
make_analysator can now handle TypeErrors
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/util.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/util.py b/pygments/util.py index 429e40a1..a400624b 100644 --- a/pygments/util.py +++ b/pygments/util.py @@ -118,7 +118,7 @@ def make_analysator(f): return 0.0 try: return min(1.0, max(0.0, float(rv))) - except ValueError: + except (ValueError, TypeError): return 0.0 text_analyse.__doc__ = f.__doc__ return staticmethod(text_analyse) |