avoid displaying "do you want to dump" message if no searched columns have been found

This commit is contained in:
Bernardo Damele 2012-12-18 18:07:34 +00:00
parent 326ed33f31
commit 738dbde16c

View File

@ -534,14 +534,13 @@ class Search:
else: else:
foundCols[column][db] = [tbl] foundCols[column][db] = [tbl]
if not foundCols: if dbs:
conf.dumper.dbColumns(foundCols, colConsider, dbs)
self.dumpFoundColumn(dbs, foundCols, colConsider)
else:
warnMsg = "no databases have tables containing any of the " warnMsg = "no databases have tables containing any of the "
warnMsg += "provided columns" warnMsg += "provided columns"
logger.warn(warnMsg) logger.warn(warnMsg)
return
conf.dumper.dbColumns(foundCols, colConsider, dbs)
self.dumpFoundColumn(dbs, foundCols, colConsider)
def search(self): def search(self):
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2): if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2):