Skip to content

Commit

Permalink
Adapt to current PEP-8 version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Oct 17, 2016
1 parent eccbd9e commit 4e1552c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/zope/securitypolicy/metaconfigure.py
Expand Up @@ -27,9 +27,9 @@


def grant(_context, principal=None, role=None, permission=None):
nspecified = ((principal is not None) +
(role is not None) +
(permission is not None))
nspecified = ((principal is not None)
+ (role is not None)
+ (permission is not None))

if nspecified != 2:
raise ConfigurationError(
Expand Down Expand Up @@ -62,8 +62,8 @@ def grant(_context, principal=None, role=None, permission=None):
def grantAll(_context, principal=None, role=None):
"""Grant all permissions to a role or principal
"""
nspecified = ((principal is not None) +
(role is not None))
nspecified = ((principal is not None)
+ (role is not None))

if nspecified != 1:
raise ConfigurationError(
Expand Down

0 comments on commit 4e1552c

Please sign in to comment.