Run "futurize -1 -w -n ."

This commit is contained in:
Russell Jones 2015-10-01 20:00:28 +01:00
parent 7f11256fc8
commit 06c3dc0ed3
55 changed files with 281 additions and 244 deletions

View file

@ -200,7 +200,7 @@ class DefaultChannel(ChannelDB):
# note our addition of the from_channel keyword here. This could be checked
# by a custom player.msg() to treat channel-receives differently.
entity.msg(msg.message, from_obj=msg.senders, from_channel=self.id)
except AttributeError, e:
except AttributeError as e:
logger.log_trace("%s\nCannot send msg to '%s'." % (e, entity))
def msg(self, msgobj, header=None, senders=None, sender_strings=None,

View file

@ -3,6 +3,7 @@ These managers define helper methods for accessing the database from
Comm system components.
"""
from __future__ import print_function
from django.db import models
from django.db.models import Q
@ -108,7 +109,7 @@ def to_object(inp, objtype='player'):
return _PlayerDB.objects.get(user_username__iexact=obj)
if typ == 'dbref':
return _PlayerDB.objects.get(id=obj)
print objtype, inp, obj, typ, type(inp)
print(objtype, inp, obj, typ, type(inp))
raise CommError()
elif objtype == 'object':
if typ == 'player':
@ -117,14 +118,14 @@ def to_object(inp, objtype='player'):
return _ObjectDB.objects.get(db_key__iexact=obj)
if typ == 'dbref':
return _ObjectDB.objects.get(id=obj)
print objtype, inp, obj, typ, type(inp)
print(objtype, inp, obj, typ, type(inp))
raise CommError()
elif objtype == 'channel':
if typ == 'string':
return _ChannelDB.objects.get(db_key__iexact=obj)
if typ == 'dbref':
return _ChannelDB.objects.get(id=obj)
print objtype, inp, obj, typ, type(inp)
print(objtype, inp, obj, typ, type(inp))
raise CommError()
#