Log message for revision 90177:
  Don't assume Warning is an old-style class (i.e., in Python 2.5).

Changed:
  U   Zope/trunk/lib/python/Zope2/Startup/warnfilter.py

-=-
Modified: Zope/trunk/lib/python/Zope2/Startup/warnfilter.py
===================================================================
--- Zope/trunk/lib/python/Zope2/Startup/warnfilter.py   2008-08-24 18:09:54 UTC 
(rev 90176)
+++ Zope/trunk/lib/python/Zope2/Startup/warnfilter.py   2008-08-24 18:10:32 UTC 
(rev 90177)
@@ -35,7 +35,7 @@
             cat = getattr(m, klass)
         except AttributeError:
             raise ValueError("unknown warning category: %s" % `category`)
-    if (not isinstance(cat, types.ClassType) or
+    if (not isinstance(cat, type(Warning)) or
         not issubclass(cat, Warning)):
         raise ValueError("invalid warning category: %s" % `category`)
     return cat

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to