Skip to content

Commit

Permalink
fix: do not compute Zope.app().REQUEST when it's not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
bsuttor committed Nov 28, 2024
1 parent fb740c3 commit 97da476
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/z3c/jbot/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

try:
import Acquisition # noqa
import Zope2 # noqa
ZOPE_3 = False
except ImportError:
ZOPE_3 = True
Expand All @@ -25,7 +24,7 @@ def getRequest():
try:
return site.request
except AttributeError:
return getattr(site, "REQUEST", Zope2.app().REQUEST)
return None

try:
i = zope.security.management.getInteraction()
Expand Down

0 comments on commit 97da476

Please sign in to comment.