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