[Zope3-checkins] SVN:
Zope3/trunk/src/zope/configuration/xmlconfig.pyFixed the
"unbound local" error if a different IOError is raised.
Phil Ruggera
pruggera at san.rr.com
Fri Aug 6 17:36:07 EDT 2004
In W2K the unit tests give me:
Failure in test openInOrPlain (zope.configuration.xmlconfig)
Traceback (most recent call last):
File "G:\Python\Dev\zope\src\zope\testing\doctestunit.py", line 71, in
runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for
zope.configuration.xmlconfig.openInOrPlain
File "G:\Python\Dev\zope\src\zope\configuration\xmlconfig.py", line 251,
in openInOrPlain
*****************************************************************
Failure in example: f = openInOrPlain('.')
from line #30 of zope.configuration.xmlconfig.openInOrPlain
Expected: IOError: [Errno 21] Is a directory
Got: IOError: [Errno 13] Permission denied: '.'
> -----Original Message-----
> From: zope3-checkins-bounces at zope.org
> [mailto:zope3-checkins-bounces at zope.org]On Behalf Of Steve Alexander
> Sent: Friday, August 06, 2004 8:38 AM
> To: zope3-checkins at zope.org
> Subject: [Zope3-checkins] SVN:
> Zope3/trunk/src/zope/configuration/xmlconfig.pyFixed the "unbound local"
> error if a different IOError is raised.
>
>
> Log message for revision 26934:
> Fixed the "unbound local" error if a different IOError is raised.
>
>
>
> Changed:
> U Zope3/trunk/src/zope/configuration/xmlconfig.py
>
>
> -=-
> Modified: Zope3/trunk/src/zope/configuration/xmlconfig.py
> ===================================================================
> --- Zope3/trunk/src/zope/configuration/xmlconfig.py 2004-08-06
> 09:42:17 UTC (rev 26933)
> +++ Zope3/trunk/src/zope/configuration/xmlconfig.py 2004-08-06
> 15:38:16 UTC (rev 26934)
> @@ -276,6 +276,13 @@
> >>> f.name[-11:]
> 'foo.zcml.in'
>
> + Make sure other IOErrors are re-raised:
> +
> + >>> f = openInOrPlain('.')
> + Traceback (most recent call last):
> + ...
> + IOError: [Errno 21] Is a directory
> +
> """
> try:
> fp = open(filename)
> @@ -286,6 +293,8 @@
> fp = open(fn)
> else:
> raise
> + else:
> + raise
> return fp
>
> class IInclude(Interface):
>
> _______________________________________________
> Zope3-Checkins mailing list
> Zope3-Checkins at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-checkins
>
More information about the Zope3-Checkins
mailing list