[Zodb-checkins] CVS: Zope/lib/python/zLOG - component.xml:1.10
datatypes.py:1.13
Chris McDonough
cvs-admin at zope.org
Thu Nov 6 02:59:13 EST 2003
Update of /cvs-repository/Zope/lib/python/zLOG
In directory cvs.zope.org:/tmp/cvs-serv13927
Modified Files:
component.xml datatypes.py
Log Message:
Remove warnfilter options (move to Zope.Startup).
=== Zope/lib/python/zLOG/component.xml 1.9 => 1.10 ===
--- Zope/lib/python/zLOG/component.xml:1.9 Fri Oct 31 03:00:24 2003
+++ Zope/lib/python/zLOG/component.xml Thu Nov 6 02:59:11 2003
@@ -58,12 +58,4 @@
<multisection type="zLOG.loghandler" attribute="handlers" name="*"/>
</sectiontype>
- <sectiontype name="warnfilter" datatype=".warning_filter_handler">
- <key name="action" datatype=".warn_action" default="default"/>
- <key name="message" default=""/>
- <key name="category" datatype=".warning_subclass" default="Warning"/>
- <key name="module" default=""/>
- <key name="lineno" datatype="integer" default="0"/>
- </sectiontype>
-
</component>
=== Zope/lib/python/zLOG/datatypes.py 1.12 => 1.13 ===
--- Zope/lib/python/zLOG/datatypes.py:1.12 Fri Oct 31 03:00:24 2003
+++ Zope/lib/python/zLOG/datatypes.py Thu Nov 6 02:59:12 2003
@@ -257,31 +257,3 @@
except ImportError:
raise ValueError, (
'The object named by "%s" could not be imported' % name )
-
-def warning_subclass(val):
- ob = importable_name(val) # will fail in course
- try:
- if not issubclass(ob, Warning):
- raise ValueError, (
- 'warning category "%s" must be a Warning subclass' % val)
- except TypeError:
- raise ValueError, (
- 'warning category "%s" must be a Warning subclass' % val)
-
- return ob
-
-def warn_action(val):
- OK = ("error", "ignore", "always", "default", "module", "once")
- if val not in OK:
- raise ValueError, "warning action %s not one of %s" % (val, OK)
- return val
-
-def warning_filter_handler(section):
- import warnings
- # add the warning filter
- warnings.filterwarnings(section.action, section.message, section.category,
- section.module, section.lineno, 1)
- return section
-
-
-
More information about the Zodb-checkins
mailing list