def IsEqual(version, major, minor, revision):
  if version is None:
    return False

  if revision is None:
    current_major, current_minor, _ = version
    return (current_major, current_minor) == (major, minor)

  return version == (major, minor, revision)
Decide if a given version matches the given version.
dataset/ETHPy150Open ganeti/ganeti/lib/utils/version.py/IsEqual