From a067e805faf4c1a6233e952484d4858c3ff5a863 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 17 Dec 2010 22:23:01 +0000 Subject: [PATCH] minor update --- plugins/generic/enumeration.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index f2e200d02..cebd317b1 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -1104,7 +1104,13 @@ class Enumeration: kb.data.cachedColumns = self.getColumns(onlyColNames=True) colList = kb.data.cachedColumns[conf.db][conf.tbl].keys() - colList.sort(key=lambda x: x.lower()) + colList.sort(key=lambda x: x.lower() if isinstance(x, basestring) else None) + + if colList in ([None], ['None']): + warnMsg = "unable to retrieve column names" + logger.warn(warnMsg) + return None + colString = ", ".join(column for column in colList) infoMsg = "fetching"