Merge pull request #35 from tkf/no-none-description

Do not return None from Completion.description
This commit is contained in:
David Halter
2012-10-19 13:45:33 -07:00
+2 -1
View File
@@ -67,7 +67,8 @@ class Completion(object):
def description(self): def description(self):
""" Provides a description of the completion object """ Provides a description of the completion object
TODO return value is just __repr__ of some objects, improve! """ TODO return value is just __repr__ of some objects, improve! """
return str(self.name.parent()) parent = self.name.parent()
return '' if parent is None else str(parent)
@property @property
def doc(self): def doc(self):