[Twisted-Python] Incompatible changes to twistd 16.3.2 to 16.4.0

Thomas Westfeld thomas.westfeld at currenta.de
Tue Jul 11 09:04:38 MDT 2017


Dear all,

I am experiencing an issue with my twistd plugin. It is in a project_plugin.py 
file in the twisted/plugins directory of my project.

Calling "twistd --help" works fine up to twistd version 16.3.2 but in 16.4.0 
the plugin is not recognized anymore.

This is how it looks like:

from zope.interface import implementer

from twisted.application.service import IServiceMaker
from twisted.application import internet
from twisted.plugin import IPlugin
from twisted.python import usage

from myfile import MyFactory

class Options(usage.Options):
	optParameters = [["port", "p", 8000, "The port number to listen on."],
                         ["my-hostname", "l", "", "the hostname of other 
server"],
                         ["my-port", "i", 9000,"the port of the other 
server"]]

@implementer(IServiceMaker, IPlugin)
class MyServiceMaker(object):
        tapname = "myserver"
        description = ""
        options = Options

        def makeService(self, options):
            return internet.TCPServer(int(options["port"]), 
MyFactory(options["my-hostname"], options["my-port"]))

serviceMaker = MyServiceMaker()

Any help is appreciated.

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6085 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20170711/b26d4613/attachment.bin>


More information about the Twisted-Python mailing list