[Zope-Checkins] SVN: Zope/trunk/lib/python/Testing/common.py
getting rid of zLOG
Andreas Jung
andreas at andreas-jung.com
Sun Jan 8 06:37:49 EST 2006
Log message for revision 41207:
getting rid of zLOG
Changed:
U Zope/trunk/lib/python/Testing/common.py
-=-
Modified: Zope/trunk/lib/python/Testing/common.py
===================================================================
--- Zope/trunk/lib/python/Testing/common.py 2006-01-08 11:27:35 UTC (rev 41206)
+++ Zope/trunk/lib/python/Testing/common.py 2006-01-08 11:37:48 UTC (rev 41207)
@@ -42,32 +42,7 @@
__repr__ = __str__
-def catch_log_errors():
- import zLOG
- if hasattr(zLOG, 'old_log_write'):
- return
-
- def log_write(subsystem, severity, summary, detail, error,
- PROBLEM=zLOG.PROBLEM):
- # we are logging an exception - lets assume that the last exception
- # raised was the one we're interested in, so re-raise it rather
- # than the less-than-useful assert below
- if error is not None:
- raise
- if severity > PROBLEM:
- assert 0, "%s(%s): %s" % (subsystem, severity, summary)
-
- zLOG.old_log_write = zLOG.log_write
- zLOG.log_write = log_write
-
-def ignore_log_errors():
- import zLOG
-
- if hasattr(zLOG, 'old_log_write'):
- zLOG.log_write = zLOG.old_log_write
- del zLOG.old_log_write
-
def Testing_file(*args):
dir = os.path.split(Testing.__file__)[0]
return apply(os.path.join, (dir,) + args)
More information about the Zope-Checkins
mailing list