Refactor code to remove alerts as per lgtm and #1176.
This commit is contained in:
parent
dcde526f6d
commit
74eebfed6d
54 changed files with 226 additions and 264 deletions
|
|
@ -12,10 +12,10 @@ There are two similar but separate stores of sessions:
|
|||
handle network communication but holds no game info.
|
||||
|
||||
"""
|
||||
import time
|
||||
from builtins import object
|
||||
from future.utils import listvalues
|
||||
|
||||
from time import time
|
||||
from django.conf import settings
|
||||
from evennia.commands.cmdhandler import CMD_LOGINSTART
|
||||
from evennia.utils.logger import log_trace
|
||||
|
|
@ -89,7 +89,10 @@ def delayed_import():
|
|||
if not _ScriptDB:
|
||||
from evennia.scripts.models import ScriptDB as _ScriptDB
|
||||
# including once to avoid warnings in Python syntax checkers
|
||||
_ServerSession, _PlayerDB, _ServerConfig, _ScriptDB
|
||||
assert(_ServerSession)
|
||||
assert(_PlayerDB)
|
||||
assert(_ServerConfig)
|
||||
assert(_ScriptDB)
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
|
|
@ -565,7 +568,7 @@ class ServerSessionHandler(SessionHandler):
|
|||
see if any are dead or idle.
|
||||
|
||||
"""
|
||||
tcurr = time()
|
||||
tcurr = time.time()
|
||||
reason = _("Idle timeout exceeded, disconnecting.")
|
||||
for session in (session for session in self.values()
|
||||
if session.logged_in and _IDLE_TIMEOUT > 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue