Remove use of unavailable django force_unicode().
This commit is contained in:
parent
b88c74a316
commit
7477cc56e0
1 changed files with 1 additions and 2 deletions
|
|
@ -23,7 +23,6 @@ import time
|
||||||
from twisted.web import server, resource
|
from twisted.web import server, resource
|
||||||
from twisted.internet.task import LoopingCall
|
from twisted.internet.task import LoopingCall
|
||||||
from django.utils.functional import Promise
|
from django.utils.functional import Promise
|
||||||
from django.utils.encoding import force_unicode
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from evennia.utils.ansi import parse_ansi
|
from evennia.utils.ansi import parse_ansi
|
||||||
from evennia.utils import utils
|
from evennia.utils import utils
|
||||||
|
|
@ -44,7 +43,7 @@ _KEEPALIVE = 30 # how often to check keepalive
|
||||||
class LazyEncoder(json.JSONEncoder):
|
class LazyEncoder(json.JSONEncoder):
|
||||||
def default(self, obj):
|
def default(self, obj):
|
||||||
if isinstance(obj, Promise):
|
if isinstance(obj, Promise):
|
||||||
return force_unicode(obj)
|
return str(obj)
|
||||||
return super(LazyEncoder, self).default(obj)
|
return super(LazyEncoder, self).default(obj)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue