[Zope3-checkins] 
	SVN: Zope3/trunk/src/zope/configuration/xmlconfig.py
	Fixed the "unbound local" error if a different IOError is raised.
    Steve Alexander 
    steve at z3u.com
       
    Fri Aug  6 11:38:17 EDT 2004
    
    
  
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):
    
    
More information about the Zope3-Checkins
mailing list