From 658fad42b04420962e6ac478247411ee77483d93 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Wed, 25 Apr 2012 22:08:22 -0400 Subject: General code cleanup. - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization. --- src/mailman/app/templates.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/mailman/app/templates.py') diff --git a/src/mailman/app/templates.py b/src/mailman/app/templates.py index a91231cfc..f29781e58 100644 --- a/src/mailman/app/templates.py +++ b/src/mailman/app/templates.py @@ -31,7 +31,7 @@ from contextlib import closing from urllib import addinfourl from urlparse import urlparse from zope.component import getUtility -from zope.interface import implements +from zope.interface import implementer from mailman.utilities.i18n import TemplateNotFoundError, find from mailman.interfaces.languages import ILanguageManager @@ -92,11 +92,10 @@ class MailmanHandler(urllib2.BaseHandler): +@implementer(ITemplateLoader) class TemplateLoader: """Loader of templates, with caching and support for mailman:// URIs.""" - implements(ITemplateLoader) - def __init__(self): opener = urllib2.build_opener(MailmanHandler()) urllib2.install_opener(opener) -- cgit v1.2.3-70-g09d2