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:
Diffstat (limited to 'release/scripts/modules/console/complete_import.py')
-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 []