Skip to content

Commit

Permalink
[fc] Repository: plone.app.upgrade
Browse files Browse the repository at this point in the history
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
gforcada committed Feb 27, 2015
1 parent 7b6bc90 commit 5e57c8a
Showing 1 changed file with 50 additions and 1,171 deletions.
Loading

0 comments on commit 5e57c8a

Please sign in to comment.