From 60ecf95383b7c2a23b297065122760c9b410abe3 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 14 Jun 2011 08:40:25 +0000 Subject: [PATCH] fix for a bug reported by seyi.akin@gmail.com --- doc/THANKS | 3 +++ plugins/dbms/sybase/enumeration.py | 2 +- plugins/generic/enumeration.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/THANKS b/doc/THANKS index a5fea0aa2..1eb9c5229 100644 --- a/doc/THANKS +++ b/doc/THANKS @@ -3,6 +3,9 @@ Santiago Accurso for reporting a bug +Olu Akindeinde + for reporting a minor bug + David Alvarez for reporting a bug diff --git a/plugins/dbms/sybase/enumeration.py b/plugins/dbms/sybase/enumeration.py index fe77675be..a0fa255fb 100644 --- a/plugins/dbms/sybase/enumeration.py +++ b/plugins/dbms/sybase/enumeration.py @@ -217,7 +217,7 @@ class Enumeration(GenericEnumeration): columns = {} for name, type_ in zip(retVal[0]["%s.name" % randStr], retVal[0]["%s.usertype" % randStr]): - columns[name] = sybaseTypes[type_] if type_ else None + columns[name] = sybaseTypes.get(type_, type_) table[tbl] = columns kb.data.cachedColumns[conf.db] = table diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 2cf860ca6..1ac785f11 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -1198,7 +1198,7 @@ class Enumeration: colType = inject.getValue(query, inband=False, error=False) if Backend.isDbms(DBMS.FIREBIRD): - colType = firebirdTypes[colType] if colType in firebirdTypes else colType + colType = firebirdTypes.get(colType, colType) column = safeSQLIdentificatorNaming(column) columns[column] = colType