This commit is contained in:
Miroslav Stampar 2015-10-25 15:32:02 +01:00
parent 1b81084106
commit 89e36392f7

View File

@ -202,7 +202,7 @@ class Format(object):
if versions is None and Backend.getVersionList(): if versions is None and Backend.getVersionList():
versions = Backend.getVersionList() versions = Backend.getVersionList()
return Backend.getDbms() if versions is None else "%s %s" % (Backend.getDbms(), " and ".join(v for v in versions)) return Backend.getDbms() if versions is None else "%s %s" % (Backend.getDbms(), " and ".join(filter(None, versions)))
@staticmethod @staticmethod
def getErrorParsedDBMSes(): def getErrorParsedDBMSes():
@ -471,15 +471,17 @@ class Backend:
@staticmethod @staticmethod
def getVersion(): def getVersion():
if len(kb.dbmsVersion) > 0: versions = filter(None, flattenValue(kb.dbmsVersion))
return kb.dbmsVersion[0] if not isNoneValue(versions):
return versions[0]
else: else:
return None return None
@staticmethod @staticmethod
def getVersionList(): def getVersionList():
if len(kb.dbmsVersion) > 0: versions = filter(None, flattenValue(kb.dbmsVersion))
return kb.dbmsVersion if not isNoneValue(versions):
return versions
else: else:
return None return None