Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue