Reformatted code base using black.

This commit is contained in:
Goffi 2024-06-19 18:44:57 +02:00
commit 53fdaa9d09

View file

@ -40,7 +40,6 @@ PLUGIN_INFO = {
}
class Manhole(object):
def __init__(self, host):
@ -50,10 +49,17 @@ class Manhole(object):
self.start_manhole(port)
def start_manhole(self, port):
log.warning(_("/!\\ Manhole debug server activated, be sure to not use it in "
"production, this is dangerous /!\\"))
log.info(_("You can connect to manhole server using telnet on port {port}")
.format(port=port))
log.warning(
_(
"/!\\ Manhole debug server activated, be sure to not use it in "
"production, this is dangerous /!\\"
)
)
log.info(
_("You can connect to manhole server using telnet on port {port}").format(
port=port
)
)
f = protocol.ServerFactory()
namespace = {
"host": self.host,
@ -61,9 +67,10 @@ class Manhole(object):
"jid": jid,
"d": defer.ensureDeferred,
}
f.protocol = lambda: TelnetTransport(TelnetBootstrapProtocol,
insults.ServerProtocol,
ColoredManhole,
namespace=namespace,
)
f.protocol = lambda: TelnetTransport(
TelnetBootstrapProtocol,
insults.ServerProtocol,
ColoredManhole,
namespace=namespace,
)
reactor.listenTCP(port, f)