Clarified the error when trying to examine an object on which you have neither examine, nor view permissions. Resolves #954.

This commit is contained in:
Griatch 2016-04-12 21:01:20 +02:00
parent fc341b20a0
commit 143df2a793
2 changed files with 5 additions and 1 deletions

View file

@ -2011,6 +2011,7 @@ class CmdExamine(ObjManipCommand):
# we have given a specific target object
for objdef in self.lhs_objattr:
obj = None
obj_name = objdef['name']
obj_attrs = objdef['attrs']

View file

@ -1344,7 +1344,10 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
"""
if not target.access(self, "view"):
return "Could not find '%s'." % target
try:
return "Could not view '%s'." % target.get_display_name(self)
except AttributeError:
return "Could not view '%s'." % target.key
# the target's at_desc() method.
target.at_desc(looker=self)
return target.return_appearance(self)