Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-04-25 19:21:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-04-25 19:21:46 +0400
commit93bc6fb829c4ee1e32f7891ec0b4989d908f45e2 (patch)
treecb97d1e4cd281e544926fb557c7f0b3bdcb09ea1 /release
parentcacd2477c0daae08e1602d65419cbc645b628c38 (diff)
py console autocomp. fix
import missing_mod ...would raise an error.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/console/complete_import.py6
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 []