[Zope-CVS] CVS: Products/AdaptableStorage/mapper_std - PathKeychainGenerator.py:1.1.2.2

Christian Zagrodnick cz@gocept.com
Tue, 21 Jan 2003 03:11:52 -0500


Update of /cvs-repository/Products/AdaptableStorage/mapper_std
In directory cvs.zope.org:/tmp/cvs-serv25960/mapper_std

Modified Files:
      Tag: zagy-patches
	PathKeychainGenerator.py 
Log Message:
merging HEAD into zagy-patches branch

=== Products/AdaptableStorage/mapper_std/PathKeychainGenerator.py 1.1.2.1 => 1.1.2.2 ===
--- Products/AdaptableStorage/mapper_std/PathKeychainGenerator.py:1.1.2.1	Mon Jan 13 14:47:11 2003
+++ Products/AdaptableStorage/mapper_std/PathKeychainGenerator.py	Tue Jan 21 03:11:20 2003
@@ -16,7 +16,7 @@
 $Id$
 """
 
-from mapper_public import IKeychainGenerator
+from mapper_public import IKeychainGenerator, MappingError
 
 class PathKeychainGenerator:
     """Path-based keychain generator
@@ -24,7 +24,9 @@
     __implements__ = IKeychainGenerator
 
     def makeKeychain(self, event, name, stored):
-        if name.startswith('.') or '/' in name:
+        if name is None:
+            raise MappingError('Path keychains require a name')
+        if '/' in name:
             raise ValueError, '%s is not a legal name' % name
         parent_keychain = event.getKeychain()
         k = parent_keychain[-1]