Skip to content

Commit

Permalink
autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Nov 24, 2016
1 parent be7a251 commit 70493d8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ New features:

Bug fixes:

- Code Style: utf8-headers, sorting, new style namespace delcaration,
- Code Style: utf8-headers, import sorting, new style namespace declaration, autopep8
[jensens]

3.0.22 (2016-11-17)
Expand Down
3 changes: 2 additions & 1 deletion plone/protect/authenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ def verify(self, extra='', name="_authenticator"):

def check(request, extra='', name="_authenticator", manager=None):
if isinstance(request, HTTPRequest):
if not _verify_request(request, extra=extra, name=name, manager=manager):
if not _verify_request(request, extra=extra,
name=name, manager=manager):
raise Forbidden('Form authenticator is invalid.')


Expand Down
3 changes: 2 additions & 1 deletion plone/protect/monkey.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def marmoset_patch(func, replacement):

# otherwise the patches do not get applied in some cases
if hasattr(pluggable_utils, 'checkCSRFToken'):
marmoset_patch(pluggable_utils.checkCSRFToken, pluggableauth__checkCSRFToken)
marmoset_patch(pluggable_utils.checkCSRFToken,
pluggableauth__checkCSRFToken)
if hasattr(pluggable_utils, 'getCSRFToken'):
marmoset_patch(pluggable_utils.getCSRFToken, pluggableauth__getCSRFToken)
2 changes: 2 additions & 0 deletions plone/protect/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def __call__(self):
self.request.URL,
)


class TestSafeToWriteObject(BrowserView):

def __call__(self):
self.context.foo = 'bar'
safeWrite(self)
Expand Down
3 changes: 2 additions & 1 deletion plone/protect/tests/testPatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ def setUp(self):
self.browser.addHeader(
'Authorization', 'Basic %s:%s' % (SITE_OWNER_NAME, SITE_OWNER_PASSWORD,))

def test_change_password_on_root_does_not_throw_other_csrf_protection(self):
def test_change_password_on_root_does_not_throw_other_csrf_protection(
self):
self.browser.open('%s/acl_users/users/manage_users?user_id=%s&passwd=1' % (
self.layer['app'].absolute_url(), SITE_OWNER_NAME))
self.browser.getControl(name='password').value = SITE_OWNER_PASSWORD
Expand Down

0 comments on commit 70493d8

Please sign in to comment.