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

Skip to content

Commit a6015b5

Browse files
committed
fix for a bug reported by jaccovantuijl@gmail.​com (entries = zip(*[entries[colName] for colName in colList]))
1 parent 9927f5a commit a6015b5

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

plugins/generic/enumeration.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,10 @@ def __pivotDumpTable(self, table, colList, count=None, blind=True):
11831183
logger.info(infoMsg)
11841184
return entries
11851185

1186+
for column in colList:
1187+
lengths[column] = 0
1188+
entries[column] = []
1189+
11861190
colList = sorted(colList, key=lambda x: len(x) if x else MAX_INT)
11871191

11881192
for column in colList:
@@ -1199,6 +1203,7 @@ def __pivotDumpTable(self, table, colList, count=None, blind=True):
11991203

12001204
if isNumPosStrValue(value):
12011205
validColumnList = True
1206+
12021207
if value == count:
12031208
infoMsg = "using column '%s' as a pivot " % column
12041209
infoMsg += "for retrieving row data"
@@ -1228,12 +1233,6 @@ def __pivotDumpTable(self, table, colList, count=None, blind=True):
12281233
break
12291234

12301235
for column in colList:
1231-
if column not in lengths:
1232-
lengths[column] = 0
1233-
1234-
if column not in entries:
1235-
entries[column] = []
1236-
12371236
if column == colList[0]:
12381237
# Correction for pivotValues with unrecognized chars
12391238
if pivotValue and '?' in pivotValue and pivotValue[0] != '?':

0 commit comments

Comments
 (0)