1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-13 10:22:20 +03:00
Files
certbot/examples/plugins/letsencrypt_example_plugins.py
Roy Wellington Ⅳ e9d981aceb Change zope's classProvides to be a class decorator.
When attempting to import any module that uses
zope.interface.classProvides in Python 3, a TypeError is raised; it
reads:

    TypeError: Class advice impossible in Python3.  Use the @provider
    class decorator instead.

Following the listed advice seems to function in Python 3.
2016-02-20 00:41:01 -08:00

32 lines
879 B
Python

"""Example Let's Encrypt plugins.
For full examples, see `letsencrypt.plugins`.
"""
import zope.interface
from letsencrypt import interfaces
from letsencrypt.plugins import common
@zope.interface.implementer(interfaces.IAuthenticator)
@zope.interface.provider(interfaces.IPluginFactory)
class Authenticator(common.Plugin):
"""Example Authenticator."""
description = "Example Authenticator plugin"
# Implement all methods from IAuthenticator, remembering to add
# "self" as first argument, e.g. def prepare(self)...
@zope.interface.implementer(interfaces.IInstaller)
@zope.interface.provider(interfaces.IPluginFactory)
class Installer(common.Plugin):
"""Example Installer."""
description = "Example Installer plugin"
# Implement all methods from IInstaller, remembering to add
# "self" as first argument, e.g. def get_all_names(self)...