Refactor code to remove alerts as per lgtm and #1176.

This commit is contained in:
Griatch 2017-01-29 19:02:00 +01:00
parent dcde526f6d
commit 74eebfed6d
54 changed files with 226 additions and 264 deletions

View file

@ -8,10 +8,9 @@ are stored on the Portal side)
"""
from builtins import object
import re
import weakref
import importlib
from time import time
import time
from django.utils import timezone
from django.conf import settings
from evennia.comms.models import ChannelDB
@ -218,7 +217,7 @@ class ServerSession(Session):
self.uid = self.player.id
self.uname = self.player.username
self.logged_in = True
self.conn_time = time()
self.conn_time = time.time()
self.puid = None
self.puppet = None
self.cmdset_storage = settings.CMDSET_SESSION
@ -332,7 +331,7 @@ class ServerSession(Session):
"""
# Idle time used for timeout calcs.
self.cmd_last = time()
self.cmd_last = time.time()
# Store the timestamp of the user's last command.
if not idle:
@ -508,7 +507,7 @@ class ServerSession(Session):
"""
string = "Cannot assign directly to ndb object! "
string = "Use ndb.attr=value instead."
string += "Use ndb.attr=value instead."
raise Exception(string)
#@ndb.deleter