Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 344ef9a

Browse files
committed
Language fix (in lots of cases wrong statement 'unable to retrieve columns for any table in database' was reported)
1 parent 5477c9f commit 344ef9a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugins/generic/databases.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,9 @@ def getColumns(self, onlyColNames=False, colTuple=None, bruteForce=None):
662662
kb.data.cachedColumns[safeSQLIdentificatorNaming(conf.db)] = table
663663

664664
if not kb.data.cachedColumns:
665-
errMsg = "unable to retrieve the columns for any "
666-
errMsg += "table in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
665+
errMsg = "unable to retrieve column names for "
666+
errMsg += ("table '%s' " % tblList[0]) if len(tblList) == 1 else "any table "
667+
errMsg += "in database '%s'" % unsafeSQLIdentificatorNaming(conf.db)
667668
logger.error(errMsg)
668669

669670
if bruteForce is None:

0 commit comments

Comments
 (0)