Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
fix a bug where clear could have been called on a dummy needed resources
Browse files Browse the repository at this point in the history
  • Loading branch information
janwijbrand committed Jan 20, 2011
1 parent 7539c63 commit 5bfd855
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
CHANGES
*******

0.10 (unreleased)
0.9.1 (unreleased)
-----------------

- Nothing changed yet.

- Do not clear resources on DummyNeededResources objects.

0.9 (2011-01-20)
----------------
Expand Down
4 changes: 3 additions & 1 deletion src/zope/fanstatic/zopesupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ def set_base_url(event):

@adapter(IHandleExceptionEvent)
def clear_needed_resources(event):
fanstatic.clear_needed()
needed = fanstatic.get_needed()
if isinstance(needed, fanstatic.NeededResources):
needed.clear()

_sentinel = object()

Expand Down

0 comments on commit 5bfd855

Please sign in to comment.