Created
March 21, 2011 00:22
-
-
Save thatch/878821 to your computer and use it in GitHub Desktop.
Diff to diagnose issue 645
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 62c4935c6f63 pygments/util.py | |
--- a/pygments/util.py Sat Mar 19 20:00:07 2011 -0700 | |
+++ b/pygments/util.py Sun Mar 20 17:22:03 2011 -0700 | |
@@ -120,6 +120,8 @@ | |
return min(1.0, max(0.0, float(rv))) | |
except ValueError: | |
return 0.0 | |
+ except TypeError: | |
+ raise TypeError("Error analyzing %r %r %r" % (f, rv, text)) | |
text_analyse.__doc__ = f.__doc__ | |
return staticmethod(text_analyse) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment