]> granicus.if.org Git - python/commitdiff
Practice EAFP, and revert 62787
authorBenjamin Peterson <benjamin@python.org>
Wed, 7 May 2008 23:11:54 +0000 (23:11 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 7 May 2008 23:11:54 +0000 (23:11 +0000)
Lib/warnings.py

index 132a34da2873ea377f41ad40b92f7a1136f1d847..d9e6e4458722276ca7a04e2f6d384b8b431b76a4 100644 (file)
@@ -278,9 +278,6 @@ def warn_explicit(message, category, filename, lineno,
                 _show_warning(message, category, filename, lineno)
             else:
                 warn(showwarning_msg, DeprecationWarning)
-    if not callable(showwarning):
-        raise TypeError("warnings.showwarning() must be set to a "
-                        "function or method")
     # Print message and context
     showwarning(message, category, filename, lineno)