Skip to content

Commit

Permalink
Move comments to doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
aclark4life committed Jul 19, 2015
1 parent fe8d438 commit 5f011c2
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions zope2_bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
import os


# Based on
# https://github.com/plone/Products.CMFPlone/blob/master/Products/\
# CMFPlone/browser/admin.py#L34
#
class AppTraverser(DefaultPublishTraverse):
"""
Based on
https://github.com/plone/Products.CMFPlone/blob/master/\
Products/CMFPlone/browser/admin.py#L34
"""

adapts(IApplication, IRequest)
Expand Down Expand Up @@ -92,11 +91,17 @@ def cook(html, main, target):
main._v_cooked = main.cook()


# c.monkeypatcher requires a function or method so we give it this one, even
# though we don't need to patch it.
#
def has_plone():
"""
"""

return hasattr(Products, 'CMFPlone')


def manage_zmi_logout(self, REQUEST, RESPONSE):
"""
c.monkeypatcher requires a function or method so we give it this one even
though we're not patching it.
"""

p = getattr(REQUEST, '_logout_path', None)
Expand All @@ -108,10 +113,3 @@ def manage_zmi_logout(self, REQUEST, RESPONSE):
RESPONSE.setHeader('WWW-Authenticate', 'basic realm="%s"' % realm, 1)
RESPONSE.setBody(LOGOUT)
return


def has_plone():
"""
"""

return hasattr(Products, 'CMFPlone')

0 comments on commit 5f011c2

Please sign in to comment.