Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def createNode(self, **kw):
#kw = {}
if fcpHost and not kw.has_key("fcpHost"):
kw['host'] = fcpHost
if fcpPort and not kw.has_key("fcpPort"):
kw['port'] = fcpPort
if verbosity and not kw.has_key("verbosity"):
kw['verbosity'] = verbosity
if logfile and not kw.has_key("logfile"):
kw['logfile'] = logfile
#print kw
self.node = fcp.FCPNodeConnection(**kw)
- fcpPort - port where FCP port is
- verbosity - verbosity of output messages, 0 (silent) through 6 (noisy),
default 4. Refer verbosity constants in fcp module
"""
# create the server
host = kw.get('host', xmlrpcHost)
port = kw.get('port', xmlrpcPort)
SimpleXMLRPCServer.__init__(self, (host, port))
# create the fcp node interface
fcpHost = kw.get('fcpHost', fcp.defaultFCPHost)
fcpPort = kw.get('fcpPort', fcp.defaultFCPPort)
verbosity = kw.get('verbosity', fcp.SILENT)
node = self.node = fcp.FCPNodeConnection(host=fcpHost,
port=fcpPort,
verbosity=verbosity,
)
# create the request handler
hdlr = FreenetXMLRPCRequestHandler(node)
# link in the request handler object
self.register_instance(hdlr)
self.register_introspection_functions()