Log message for revision 112612: Merge readability fix from 2.12 branch. Changed: U Zope/trunk/src/Products/SiteAccess/AccessRule.py
-=- Modified: Zope/trunk/src/Products/SiteAccess/AccessRule.py =================================================================== --- Zope/trunk/src/Products/SiteAccess/AccessRule.py 2010-05-21 13:58:21 UTC (rev 112611) +++ Zope/trunk/src/Products/SiteAccess/AccessRule.py 2010-05-21 13:58:42 UTC (rev 112612) @@ -18,7 +18,8 @@ meta_type = 'Set Access Rule' def __call__(self, container, request): - if SUPPRESS_ACCESSRULE: return + if SUPPRESS_ACCESSRULE: + return if '_SUPPRESS_ACCESSRULE' in _swallow(request, '_SUPPRESS'): request.setVirtualRoot(request.steps) return @@ -44,8 +45,10 @@ if method_id is None or (REQUEST and REQUEST.form.has_key('none')): rules = unregisterBeforeTraverse(self, 'AccessRule') if rules: - try: del getattr(self, rules[0].name).icon - except: pass + try: + del getattr(self, rules[0].name).icon + except: + pass if REQUEST: return MessageDialog(title='No Access Rule', message='This object now has no Access Rule', @@ -53,13 +56,16 @@ elif method_id and hasattr(self, method_id): rules = unregisterBeforeTraverse(self, 'AccessRule') if rules: - try: del getattr(self, rules[0].name).icon - except: pass + try: + del getattr(self, rules[0].name).icon + except: + pass hook = AccessRule(method_id) registerBeforeTraverse(self, hook, 'AccessRule', 1) try: getattr(self, method_id).icon = 'misc_/SiteAccess/AccessRule.gif' - except: pass + except: + pass if REQUEST: return MessageDialog(title='Access Rule Set', message='"%s" is now the Access Rule for this object' _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org https://mail.zope.org/mailman/listinfo/zope-checkins