minor update

This commit is contained in:
Miroslav Stampar 2010-12-17 22:23:01 +00:00
parent 108a96c6b4
commit a067e805fa

View File

@ -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"