Fixed a bug in object's __eq__ that returned erroneous fails.

This commit is contained in:
Griatch 2012-08-12 09:55:19 +02:00
parent 2a2b3b5ce6
commit 0d1f9d5bdc
2 changed files with 5 additions and 5 deletions

View file

@ -197,7 +197,7 @@ def cmdhandler(caller, raw_string, testing=False):
if len(matches) > 1: if len(matches) > 1:
# We have a multiple-match # We have a multiple-match
syscmd = yield cmdset.get(CMD_MULTIMATCH) syscmd = yield cmdset.get(CMD_MULTIMATCH)
sysarg = _("There where multiple matches.") sysarg = _("There were multiple matches.")
if syscmd: if syscmd:
syscmd.matches = matches syscmd.matches = matches
else: else:

View file

@ -362,13 +362,13 @@ class Object(TypeClass):
parent doesn't work. parent doesn't work.
""" """
try: try:
return _GA(self, "dbid") == other \ return _GA(_GA(self, "dbobj"),"dbid") == other \
or _GA(self, "dbid") == _GA(other, "dbid") or _GA(_GA(self, "dbobj"),"dbid") == _GA(_GA(other,"dbobj"),"dbid")
except AttributeError: except AttributeError:
# compare players instead # compare players instead
try: try:
return _GA(_GA(self, "player"),"uid") == other \ return _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == other \
or _GA(_GA(self, "player"),"uid") == _GA(_GA(other, "player"),"uid") or _GA(_GA(_GA(self, "dbobj"),"player"),"uid") == _GA(_GA(other, "player"),"uid")
except AttributeError: except AttributeError:
return False return False