Added back-end dbms' OS based methods to Backend object - will be used for refactoring

This commit is contained in:
Bernardo Damele 2011-02-07 00:21:17 +00:00
parent 2e00656235
commit 3719f085ae

View File

@ -375,6 +375,10 @@ class Backend:
else:
return None
@staticmethod
def getOs():
return kb.os
# Comparison methods
@staticmethod
def isDbms(dbms):
@ -405,6 +409,10 @@ class Backend:
def isVersionGreaterOrEqualThan(version):
return Backend.getVersion() is not None and str(Backend.getVersion()) >= str(version)
@staticmethod
def isOs(os):
return Backend.getOs() is not None and Backend.getOs().lower() == kb.os.lower()
def paramToDict(place, parameters=None):
"""
Split the parameters into names and values, check if these parameters