Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Branch: refs/heads/master Date: 2015-02-27T18:10:28+01:00 Author: Jure Cerjak (jcerjak) <[email protected]> Commit: plone/plone.app.upgrade@c19fdbc don't do bare excepts Files changed: M plone/app/upgrade/v30/tests.py diff --git a/plone/app/upgrade/v30/tests.py b/plone/app/upgrade/v30/tests.py index 1bf4207..2a3a2cf 100644 --- a/plone/app/upgrade/v30/tests.py +++ b/plone/app/upgrade/v30/tests.py @@ -13,6 +13,7 @@ from plone.portlets.interfaces import ILocalPortletAssignmentManager from plone.portlets.constants import CONTEXT_CATEGORY as CONTEXT_PORTLETS +from zExceptions import BadRequest from zope.location.interfaces import ISite from zope.component import getGlobalSiteManager from zope.component import getSiteManager @@ -668,12 +669,12 @@ def testUpdateMemberSecurity(self): pprop = getToolByName(self.portal, 'portal_properties') try: self.portal.manage_addProperty('validate_email', False, 'boolean') - except: # property is already there + except BadRequest: # property is already there pass try: pprop.site_properties.manage_addProperty( 'allowAnonymousViewAbout', True, 'boolean') - except: # property is already there + except BadRequest: # property is already there pass updateMemberSecurity(self.portal) Repository: plone.app.upgrade Branch: refs/heads/master Date: 2015-02-27T22:19:32+01:00 Author: Gil Forcada (gforcada) <[email protected]> Commit: plone/plone.app.upgrade@b759071 Merge pull request #27 from plone/plip10359-security-controlpanel don't do bare excepts Files changed: M plone/app/upgrade/v30/tests.py diff --git a/plone/app/upgrade/v30/tests.py b/plone/app/upgrade/v30/tests.py index 1bf4207..2a3a2cf 100644 --- a/plone/app/upgrade/v30/tests.py +++ b/plone/app/upgrade/v30/tests.py @@ -13,6 +13,7 @@ from plone.portlets.interfaces import ILocalPortletAssignmentManager from plone.portlets.constants import CONTEXT_CATEGORY as CONTEXT_PORTLETS +from zExceptions import BadRequest from zope.location.interfaces import ISite from zope.component import getGlobalSiteManager from zope.component import getSiteManager @@ -668,12 +669,12 @@ def testUpdateMemberSecurity(self): pprop = getToolByName(self.portal, 'portal_properties') try: self.portal.manage_addProperty('validate_email', False, 'boolean') - except: # property is already there + except BadRequest: # property is already there pass try: pprop.site_properties.manage_addProperty( 'allowAnonymousViewAbout', True, 'boolean') - except: # property is already there + except BadRequest: # property is already there pass updateMemberSecurity(self.portal)
- Loading branch information