From fed178646aa12d7e577ad547e4d4943092445559 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 12 Jul 2012 01:48:07 +0100 Subject: [PATCH] minor refactoring --- plugins/generic/enumeration.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index ad8f161d6..0e06a0c4e 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -1712,6 +1712,7 @@ class Enumeration: table = "%s.%s" % (conf.db, tbl) retVal = self.__pivotDumpTable(table, colList, count, blind=True) + if retVal: entries, lengths = retVal @@ -1722,6 +1723,8 @@ class Enumeration: try: for index in indexRange: for column in colList: + value = "" + if column not in lengths: lengths[column] = 0 @@ -1743,7 +1746,6 @@ class Enumeration: # Skip enumeration of cells that have a value length of 0 if not inject.checkBooleanExpression(agent.forgeQueryOutputLengthZero(query)): logger.debug("column '%s', entry %d is blank" % (column, index+1)) - value = "" else: value = inject.getValue(query, inband=False, error=False, dump=True)