243 if word[:n] == attr and hasattr(thisobject, word): |
243 if word[:n] == attr and hasattr(thisobject, word): |
244 val = getattr(thisobject, word) |
244 val = getattr(thisobject, word) |
245 word = self._callable_postfix( |
245 word = self._callable_postfix( |
246 val, "%s.%s" % (expr, word)) |
246 val, "%s.%s" % (expr, word)) |
247 matches.append(word) |
247 matches.append(word) |
|
248 except Exception: |
248 # some badly behaved objects pollute dir() with non-strings, |
249 # some badly behaved objects pollute dir() with non-strings, |
249 # which cause the completion to fail. This way we skip the |
250 # which cause the completion to fail. This way we skip the |
250 # bad entries and can still continue processing the others. |
251 # bad entries and can still continue processing the others. |
251 pass |
252 pass |
252 return matches |
253 return matches |