Skip to content

Commit

Permalink
Ensure a dict is present to extract meta info from.
Browse files Browse the repository at this point in the history
This is an attempt to resolve #1
  • Loading branch information
leonjza committed Jul 14, 2017
1 parent 58f8cd9 commit 0781dc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion objection/console/completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def get_completions(self, document: Document, complete_event: CompleteEvent) ->
# based on the current text input and populate a 'meta' field
# if one exists.
for cmd, extra in commands.items():
meta = extra['meta'] if 'meta' in extra else None
meta = extra['meta'] if type(extra) is dict and 'meta' in extra else None

# finally, yield the generator for completions
yield Completion(cmd, -(len(word_before_cursor)), display_meta=meta)

0 comments on commit 0781dc0

Please sign in to comment.