[Zope-Checkins] CVS: Zope3/lib/python/Zope/Configuration - xmlconfig.py:1.1.2.14.2.1

Jim Fulton jim@zope.com
Sat, 27 Apr 2002 12:59:24 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/Configuration
In directory cvs.zope.org:/tmp/cvs-serv26931/lib/python/Zope/Configuration

Modified Files:
      Tag: SecurityProxy-branch
	xmlconfig.py 
Log Message:
Moved security management modules to Zope.Security.

Added like_unto attribute to protect class so you can say that a class
has the same protections as another class::

  <security:protectClass name=".RootFolder." like_unto=".Folder." />

Added some additional calls to removeAllProxies in some component
lookup code while debugging integration of new security model.

Added protections for BTree types.


=== Zope3/lib/python/Zope/Configuration/xmlconfig.py 1.1.2.14 => 1.1.2.14.2.1 ===
         if len(stack) == 1:
             try:
-                stack.append(begin(self.__directives, name, self.__context, **kw))
+                stack.append(begin(self.__directives, name, self.__context,
+                                   **kw))
             except Exception, v:
                 __traceback_supplement__ = (
                     ConfigurationTracebackSupplement, self.__locator, v
@@ -232,8 +233,10 @@
                 # will have more than one element. Also, we could
                 # use package.__file__, and lop the tail off that.
                 prefix = package.__path__[0]
-            except (ImportError, AttributeError, ValueError):
-                raise ValueError, "Invalid package attribute: %s" % package
+            except (ImportError, AttributeError, ValueError), v:
+                raise # XXX the raise below hides the real error
+                raise ValueError("Invalid package attribute: %s\n(%s)"
+                                 % (package, `v`))
         else:
             prefix = os.path.dirname(self._stack[-1])