[Zope-Checkins] CVS: Products/SiteAccess - AccessRule.py:1.5

Evan Simpson evan@zope.com
Fri, 24 Jan 2003 11:55:50 -0500


Update of /cvs-repository/Products/SiteAccess
In directory cvs.zope.org:/tmp/cvs-serv23353

Modified Files:
	AccessRule.py 
Log Message:
Make "Set Access Rule" behave reasonably in the presence of legacy BeforeTraverse data structures.


=== Products/SiteAccess/AccessRule.py 1.4 => 1.5 ===
--- Products/SiteAccess/AccessRule.py:1.4	Wed Aug 14 18:25:10 2002
+++ Products/SiteAccess/AccessRule.py	Fri Jan 24 11:55:47 2003
@@ -73,7 +73,10 @@
     self = self.this()
     rules = queryBeforeTraverse(self, 'AccessRule')
     if rules:
-        return rules[0][1].name
+        try:
+            return rules[0][1].name
+        except:
+            return 'Invalid BeforeTraverse data: ' + `rules`
     return ''
 
 constructors = (