[Zope-Checkins] CVS: Zope/lib/python/DocumentTemplate - ustr.py:1.3.20.1
Chris McDonough
chrism@zope.com
Fri, 3 Jan 2003 01:31:08 -0500
Update of /cvs-repository/Zope/lib/python/DocumentTemplate
In directory cvs.zope.org:/tmp/cvs-serv26668
Modified Files:
Tag: chrism-install-branch
ustr.py
Log Message:
Merging chrism-install-branch with HEAD (hopefully for one of the last
times).
=== Zope/lib/python/DocumentTemplate/ustr.py 1.3 => 1.3.20.1 ===
--- Zope/lib/python/DocumentTemplate/ustr.py:1.3 Thu Apr 25 08:45:11 2002
+++ Zope/lib/python/DocumentTemplate/ustr.py Fri Jan 3 01:31:05 2003
@@ -50,10 +50,13 @@
return str(v)
-def _exception_str(self):
- if not self.args:
- return ''
- elif len(self.args) == 1:
- return ustr(self.args[0])
- else:
- return str(self.args)
+def _exception_str(exc):
+ if hasattr(exc, 'args'):
+ if not exc.args:
+ return ''
+ elif len(exc.args) == 1:
+ return ustr(exc.args[0])
+ else:
+ return str(exc.args)
+ return str(exc)
+