Run black. Resolve circular import issues in components contrib.
This commit is contained in:
parent
577f66c3ec
commit
e5d07603ca
49 changed files with 202 additions and 122 deletions
|
|
@ -7,14 +7,15 @@ Sessionhandler for portal sessions.
|
|||
import time
|
||||
from collections import deque, namedtuple
|
||||
|
||||
import evennia
|
||||
from django.conf import settings
|
||||
from django.utils.translation import gettext as _
|
||||
from twisted.internet import reactor
|
||||
|
||||
import evennia
|
||||
from evennia.server.portal.amp import PCONN, PCONNSYNC, PDISCONN, PDISCONNALL
|
||||
from evennia.server.sessionhandler import SessionHandler
|
||||
from evennia.utils.logger import log_trace
|
||||
from evennia.utils.utils import class_from_module
|
||||
from twisted.internet import reactor
|
||||
|
||||
# module import
|
||||
_MOD_IMPORT = None
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@ except ImportError:
|
|||
raise ImportError(_SSH_IMPORT_ERROR)
|
||||
|
||||
from django.conf import settings
|
||||
from evennia.accounts.models import AccountDB
|
||||
from evennia.utils import ansi
|
||||
from evennia.utils.utils import class_from_module, to_str
|
||||
from twisted.conch import interfaces as iconch
|
||||
from twisted.conch.insults import insults
|
||||
from twisted.conch.manhole import Manhole, recvline
|
||||
|
|
@ -46,6 +43,10 @@ from twisted.conch.ssh.userauth import SSHUserAuthServer
|
|||
from twisted.internet import defer, protocol
|
||||
from twisted.python import components
|
||||
|
||||
from evennia.accounts.models import AccountDB
|
||||
from evennia.utils import ansi
|
||||
from evennia.utils.utils import class_from_module, to_str
|
||||
|
||||
_RE_N = re.compile(r"\|n$")
|
||||
_RE_SCREENREADER_REGEX = re.compile(
|
||||
r"%s" % settings.SCREENREADER_REGEX_STRIP, re.DOTALL + re.MULTILINE
|
||||
|
|
|
|||
|
|
@ -24,13 +24,14 @@ import time
|
|||
|
||||
from django.conf import settings
|
||||
from django.utils.functional import Promise
|
||||
from twisted.internet.task import LoopingCall
|
||||
from twisted.web import resource, server
|
||||
|
||||
from evennia.server import session
|
||||
from evennia.utils import utils
|
||||
from evennia.utils.ansi import parse_ansi
|
||||
from evennia.utils.text2html import parse_html
|
||||
from evennia.utils.utils import class_from_module, ip_from_request, to_bytes
|
||||
from twisted.internet.task import LoopingCall
|
||||
from twisted.web import resource, server
|
||||
|
||||
_CLIENT_SESSIONS = utils.mod_import(settings.SESSION_ENGINE).SessionStore
|
||||
_RE_SCREENREADER_REGEX = re.compile(
|
||||
|
|
@ -362,7 +363,7 @@ class AjaxWebClient(resource.Resource):
|
|||
sess.client = self
|
||||
sess.init_session("ajax/comet", remote_addr, self.sessionhandler)
|
||||
|
||||
sess.csessid = session_id+page_id
|
||||
sess.csessid = session_id + page_id
|
||||
sess.browserstr = browserstr
|
||||
csession = _CLIENT_SESSIONS(session_key=session_id)
|
||||
uid = csession and csession.get("webclient_authenticated_uid", False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue