[Zope-Checkins] CVS: Releases/Zope/lib/python/Products/SiteAccess - AccessRule.py:1.4.6.1

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


Update of /cvs-repository/Releases/Zope/lib/python/Products/SiteAccess
In directory cvs.zope.org:/tmp/cvs-serv22935/SiteAccess

Modified Files:
      Tag: Zope-2_6-branch
	AccessRule.py 
Log Message:
Make "Set Access Rule" behave reasonably in the presence of legacy BeforeTraverse data structures.


=== Releases/Zope/lib/python/Products/SiteAccess/AccessRule.py 1.4 => 1.4.6.1 ===
--- Releases/Zope/lib/python/Products/SiteAccess/AccessRule.py:1.4	Wed Aug 14 18:25:10 2002
+++ Releases/Zope/lib/python/Products/SiteAccess/AccessRule.py	Fri Jan 24 11:53:48 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 = (