From a9b50a1e82c343ada7d530a43f71238635466307 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 21 Oct 2010 23:09:57 +0000 Subject: [PATCH] minor fix --- lib/core/shell.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/core/shell.py b/lib/core/shell.py index ba1441160..f99fe52f7 100644 --- a/lib/core/shell.py +++ b/lib/core/shell.py @@ -29,15 +29,9 @@ def loadHistory(): def queriesForAutoCompletion(): autoComplQueries = {} - for _, query in queries[kb.dbms].items(): - if isinstance(query, basestring) and len(query) > 1: - autoComplQuery = query - elif isinstance(query, dict) and "inband" in query: - autoComplQuery = query["inband"]["query"] - else: - continue - - autoComplQueries[autoComplQuery] = None + for item in queries[kb.dbms]._toflat(): + if item._has_key('query') and len(item.query) > 1 and item._name != 'blind': + autoComplQueries[item.query] = None return autoComplQueries