Run black on sources
This commit is contained in:
parent
dc81d275e6
commit
8b2b23873f
17 changed files with 102 additions and 59 deletions
|
|
@ -261,6 +261,7 @@ if TELNET_ENABLED:
|
|||
# Start telnet game connections
|
||||
|
||||
from evennia.server.portal import telnet
|
||||
|
||||
_telnet_protocol = class_from_module(settings.TELNET_PROTOCOL_CLASS)
|
||||
|
||||
for interface in TELNET_INTERFACES:
|
||||
|
|
@ -285,6 +286,7 @@ if SSL_ENABLED:
|
|||
# Start Telnet+SSL game connection (requires PyOpenSSL).
|
||||
|
||||
from evennia.server.portal import telnet_ssl
|
||||
|
||||
_ssl_protocol = class_from_module(settings.SSL_PROTOCOL_CLASS)
|
||||
|
||||
for interface in SSL_INTERFACES:
|
||||
|
|
@ -319,6 +321,7 @@ if SSH_ENABLED:
|
|||
# evennia/game if necessary.
|
||||
|
||||
from evennia.server.portal import ssh
|
||||
|
||||
_ssh_protocol = class_from_module(settings.SSH_PROTOCOL_CLASS)
|
||||
|
||||
for interface in SSH_INTERFACES:
|
||||
|
|
@ -328,11 +331,7 @@ if SSH_ENABLED:
|
|||
for port in SSH_PORTS:
|
||||
pstring = "%s:%s" % (ifacestr, port)
|
||||
factory = ssh.makeFactory(
|
||||
{
|
||||
"protocolFactory": _ssh_protocol,
|
||||
"protocolArgs": (),
|
||||
"sessions": PORTAL_SESSIONS,
|
||||
}
|
||||
{"protocolFactory": _ssh_protocol, "protocolArgs": (), "sessions": PORTAL_SESSIONS,}
|
||||
)
|
||||
factory.noisy = False
|
||||
ssh_service = internet.TCPServer(port, factory, interface=interface)
|
||||
|
|
|
|||
|
|
@ -468,7 +468,11 @@ def getKeyPair(pubkeyfile, privkeyfile):
|
|||
from cryptography.hazmat.backends import default_backend
|
||||
from cryptography.hazmat.primitives.asymmetric import rsa
|
||||
|
||||
rsa_key = Key(rsa.generate_private_key(public_exponent=65537, key_size=_KEY_LENGTH, backend=default_backend()))
|
||||
rsa_key = Key(
|
||||
rsa.generate_private_key(
|
||||
public_exponent=65537, key_size=_KEY_LENGTH, backend=default_backend()
|
||||
)
|
||||
)
|
||||
public_key_string = rsa_key.public().toString(type="OPENSSH").decode()
|
||||
private_key_string = rsa_key.toString(type="OPENSSH").decode()
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ _HTTP_WARNING = bytes(
|
|||
_BASE_SESSION_CLASS = class_from_module(settings.BASE_SESSION_CLASS)
|
||||
|
||||
|
||||
|
||||
class TelnetServerFactory(protocol.ServerFactory):
|
||||
"This is only to name this better in logs"
|
||||
noisy = False
|
||||
|
|
|
|||
|
|
@ -101,7 +101,9 @@ class Session(object):
|
|||
the keys given by self._attrs_to_sync.
|
||||
|
||||
"""
|
||||
return {attr: getattr(self, attr) for attr in settings.SESSION_SYNC_ATTRS if hasattr(self, attr)}
|
||||
return {
|
||||
attr: getattr(self, attr) for attr in settings.SESSION_SYNC_ATTRS if hasattr(self, attr)
|
||||
}
|
||||
|
||||
def load_sync_data(self, sessdata):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ from evennia.utils.utils import (
|
|||
make_iter,
|
||||
delay,
|
||||
callables_from_module,
|
||||
class_from_module
|
||||
class_from_module,
|
||||
)
|
||||
from evennia.server.portal import amp
|
||||
from evennia.server.signals import SIGNAL_ACCOUNT_POST_LOGIN, SIGNAL_ACCOUNT_POST_LOGOUT
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue