Skip to content

Commit

Permalink
support very old zope.interface (plone 4)
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Jun 25, 2019
1 parent aa51d9a commit 4ecaa09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eea/facetednavigation/docs/exportimport.txt
Expand Up @@ -46,7 +46,7 @@ XML Export
Export empty criteria

>>> print(exporter.body.decode('utf-8').strip())
<?xml version="1.0" encoding="utf-8"?>
<?xml...?>
<object name="sandbox" meta_type="...">
<criteria/>
</object>
Expand Down
7 changes: 6 additions & 1 deletion eea/facetednavigation/events.py
@@ -1,7 +1,6 @@
""" Faceted events
"""
from zope.interface import implementer
from zope.interface.interfaces import ObjectEvent
from eea.facetednavigation.interfaces import (
IFacetedEvent,
IFacetedGlobalSettingsChangedEvent,
Expand All @@ -12,6 +11,12 @@
IQueryWillBeExecutedEvent,
)

try:
from zope.interface.interfaces import ObjectEvent
except ImportError:
# very old zope.interface (Plone 4 only)
from zope.component.interfaces import ObjectEvent


@implementer(IFacetedEvent)
class FacetedEvent(ObjectEvent):
Expand Down

0 comments on commit 4ecaa09

Please sign in to comment.