# HG changeset patch # User Thierry Florac # Date 1479200357 -3600 # Node ID 8927221a06757dd1a9557e455310cfa0b121ba96 # Parent ac54083bbe985efa4e8720f19e934c52b65e89a2 Changed vocabulary declaration diff -r ac54083bbe98 -r 8927221a0675 src/pyams_mail/mailer.py --- a/src/pyams_mail/mailer.py Thu Jun 02 15:46:08 2016 +0200 +++ b/src/pyams_mail/mailer.py Tue Nov 15 09:59:17 2016 +0100 @@ -16,19 +16,15 @@ # import interfaces from pyramid_mailer.interfaces import IMailer -from zope.schema.interfaces import IVocabularyFactory # import packages -from zope.interface import provider +from pyams_utils.vocabulary import vocabulary_config from zope.componentvocabulary.vocabulary import UtilityVocabulary -from zope.schema.vocabulary import getVocabularyRegistry -@provider(IVocabularyFactory) +@vocabulary_config(name='PyAMS mailer utilities') class MailerVocabulary(UtilityVocabulary): """Mailer vocabulary""" interface = IMailer nameOnly = True - -getVocabularyRegistry().register('PyAMS mailer utilities', MailerVocabulary)