[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/testing/ avoid dependency on zope.exceptions

Fred L. Drake, Jr. fred at zope.com
Fri Jun 11 11:50:09 EDT 2004


Log message for revision 25355:
avoid dependency on zope.exceptions


-=-
Deleted: Zope3/branches/ZopeX3-3.0/src/zope/testing/DEPENDENCIES.cfg
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/testing/DEPENDENCIES.cfg	2004-06-11 15:26:22 UTC (rev 25354)
+++ Zope3/branches/ZopeX3-3.0/src/zope/testing/DEPENDENCIES.cfg	2004-06-11 15:50:08 UTC (rev 25355)
@@ -1 +0,0 @@
-zope.exceptions

Modified: Zope3/branches/ZopeX3-3.0/src/zope/testing/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/testing/__init__.py	2004-06-11 15:26:22 UTC (rev 25354)
+++ Zope3/branches/ZopeX3-3.0/src/zope/testing/__init__.py	2004-06-11 15:50:08 UTC (rev 25355)
@@ -21,9 +21,13 @@
 def patchTracebackModule():
     """Use the ExceptionFormatter to show more info in tracebacks.
     """
-    from zope.exceptions.exceptionformatter import format_exception
-    import traceback
-    traceback.format_exception = format_exception
+    try:
+        from zope.exceptions.exceptionformatter import format_exception
+    except ImportError:
+        pass
+    else:
+        import traceback
+        traceback.format_exception = format_exception
 
 # Don't use the new exception formatter by default, since it
 # doesn't show filenames.




More information about the Zope3-Checkins mailing list