Prevent AttributeError when self.obj is None.

This commit is contained in:
Tehom 2017-06-01 02:59:46 -04:00
parent 1248428d13
commit 31e7aa1253

View file

@ -429,7 +429,7 @@ class Command(with_metaclass(CommandMeta, object)):
object, conventionally with a preceding space.
"""
if hasattr(self, 'obj') and self.obj != caller:
if hasattr(self, 'obj') and self.obj and self.obj != caller:
return " (%s)" % self.obj.get_display_name(caller).strip()
return ""