diff options
author | Amjith Ramanujam <amjith@newrelic.com> | 2014-12-18 10:45:47 -0800 |
---|---|---|
committer | Amjith Ramanujam <amjith@newrelic.com> | 2014-12-18 10:45:47 -0800 |
commit | 3277b2a8aafee3d5cc5a47d972131fa2ed655b68 (patch) | |
tree | fa3844fb420a52a08c64b4f4a3c679c0ee2bd710 | |
parent | 343494cd749527743b1d4393fd0cde0f434aa81f (diff) |
BugFix: Reset for changing a DB was using the buggy defaultdict constructor.
-rw-r--r-- | pgcli/pgcompleter.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pgcli/pgcompleter.py b/pgcli/pgcompleter.py index b4772625..8cc2e9d9 100644 --- a/pgcli/pgcompleter.py +++ b/pgcli/pgcompleter.py @@ -62,7 +62,7 @@ class PGCompleter(Completer): def reset_completions(self): self.tables = [] - self.columns = defaultdict(itertools.repeat(['*']).next) + self.columns = defaultdict(lambda: ['*']) self.all_completions = set(self.keywords) @staticmethod @@ -87,8 +87,6 @@ class PGCompleter(Completer): scoped_cols = [] for table in scope: scoped_cols.extend(self.columns[table]) - print ('scope:', scope) - print ('scoped_cols:', scoped_cols) return self.find_matches(word_before_cursor, scoped_cols) elif category == 'columns-and-functions': scoped_cols = [] |