diff --git a/lib/core/common.py b/lib/core/common.py index e99ae9e0c..7c155c64c 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -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