]> granicus.if.org Git - python/commitdiff
Bug #2220: handle rlcompleter attribute match failure more gracefully.
authorGeorg Brandl <georg@python.org>
Thu, 6 Mar 2008 07:46:26 +0000 (07:46 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 6 Mar 2008 07:46:26 +0000 (07:46 +0000)
 (backport from r61275)

Lib/rlcompleter.py
Misc/NEWS

index dab0cb9eaa394769af1ec094ed977a6526d1cd06..a2d5fe6a8f00719f411646be3760b730ba20e247 100644 (file)
@@ -125,7 +125,7 @@ class Completer:
         import re
         m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
         if not m:
-            return
+            return []
         expr, attr = m.group(1, 3)
         object = eval(expr, self.namespace)
         words = dir(object)
index 6af11b1475a79c1aec9cc9bc522f5b1e4bce1846..43bc504b826581ac4dd846993f8763e710564b9a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,6 +15,8 @@ Core and builtins
 Library
 -------
 
+- Bug #2220: handle rlcompleter attribute match failure more gracefully.
+
 - Bug #1725737: In distutil's sdist, exclude RCS, CVS etc. also in the
   root directory, and also exclude .hg, .git, .bzr, and _darcs.