[dev] added conditional import for some version of Products.CMFPlone

This commit is contained in:
Filippo Campi 2018-09-28 16:51:52 +02:00
parent 9b9143df6d
commit 6fed2ad760

View File

@ -6,7 +6,6 @@ from plone.app.registry.browser import controlpanel
from plone.registry.interfaces import IRecordModifiedEvent
from plone.registry.interfaces import IRegistry
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.interfaces.controlpanel import IConfigurationChangedEvent # noqa: E501
from Products.CMFPlone.interfaces.controlpanel import IMailSchema
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Products.statusmessages.interfaces import IStatusMessage
@ -17,6 +16,11 @@ from zope.component import getUtility
from zope.component import queryUtility
from zope.component.hooks import getSite
try:
from Products.CMFPlone.interfaces.controlpanel import IConfigurationChangedEvent # noqa: E501
except ImportError:
from Products.CMFPlone.interfaces import IConfigurationChangedEvent # noqa: E501
class DiscussionSettingsEditForm(controlpanel.RegistryEditForm):
"""Discussion settings form.