diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-04-25 19:21:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-04-25 19:21:46 +0400 |
commit | 93bc6fb829c4ee1e32f7891ec0b4989d908f45e2 (patch) | |
tree | cb97d1e4cd281e544926fb557c7f0b3bdcb09ea1 /release/scripts/modules/console | |
parent | cacd2477c0daae08e1602d65419cbc645b628c38 (diff) |
py console autocomp. fix
import missing_mod
...would raise an error.
Diffstat (limited to 'release/scripts/modules/console')
-rw-r--r-- | release/scripts/modules/console/complete_import.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/release/scripts/modules/console/complete_import.py b/release/scripts/modules/console/complete_import.py index 875c557f497..4b50cf6deb8 100644 --- a/release/scripts/modules/console/complete_import.py +++ b/release/scripts/modules/console/complete_import.py @@ -32,6 +32,7 @@ changes have been made: - limit list of modules to prefix in case of "from w" - sorted modules - added sphinx documentation +- complete() returns a blank list of the module isnt found """ @@ -183,3 +184,8 @@ def complete(line): if len(words) >= 3 and words[0] == 'from': mod = words[1] return filter_prefix(try_import(mod), words[-1]) + + # get here if the import is not found + # import invalidmodule + # ^, in this case return nothing + return [] |