def os_version_ok(item, skip_min_os_check=False):
    'Returns a boolean to indicate if the item is ok to install under\n        the current OS. If not, also adds the failure reason to the\n        rejected_items list. If skip_min_os_check is True, skips the minimum os\n        version check.'
    if (item.get('minimum_os_version') and (not skip_min_os_check)):
        min_os_vers = item['minimum_os_version']
        display.display_debug1('Considering item %s, version %s with minimum os version required %s', item['name'], item['version'], min_os_vers)
        display.display_debug1('Our OS version is %s', machine['os_vers'])
        if (pkgutils.MunkiLooseVersion(machine['os_vers']) < pkgutils.MunkiLooseVersion(min_os_vers)):
            reason = ('Rejected item %s, version %s with minimum os version required %s. Our OS version is %s.' % (item['name'], item['version'], item['minimum_os_version'], machine['os_vers']))
            rejected_items.append(reason)
            return False
    if item.get('maximum_os_version'):
        max_os_vers = item['maximum_os_version']
        display.display_debug1('Considering item %s, version %s with maximum os version supported %s', item['name'], item['version'], max_os_vers)
        display.display_debug1('Our OS version is %s', machine['os_vers'])
        if (pkgutils.MunkiLooseVersion(machine['os_vers']) > pkgutils.MunkiLooseVersion(max_os_vers)):
            reason = ('Rejected item %s, version %s with maximum os version required %s. Our OS version is %s.' % (item['name'], item['version'], item['maximum_os_version'], machine['os_vers']))
            rejected_items.append(reason)
            return False
    return True
Returns a boolean to indicate if the item is ok to install under
the current OS. If not, also adds the failure reason to the
rejected_items list. If skip_min_os_check is True, skips the minimum os
version check.
def os_version_ok(item, skip_min_os_check=False):
    'Returns a boolean to indicate if the item is ok to install under\n        the current OS. If not, also adds the failure reason to the\n        rejected_items list. If skip_min_os_check is True, skips the minimum os\n        version check.'
    if (item.get('minimum_os_version') and (not skip_min_os_check)):
        min_os_vers = item['minimum_os_version']
        display.display_debug1('Considering item %s, version %s with minimum os version required %s', item['name'], item['version'], min_os_vers)
        display.display_debug1('Our OS version is %s', machine['os_vers'])
        if (pkgutils.MunkiLooseVersion(machine['os_vers']) < pkgutils.MunkiLooseVersion(min_os_vers)):
            reason = ('Rejected item %s, version %s with minimum os version required %s. Our OS version is %s.' % (item['name'], item['version'], item['minimum_os_version'], machine['os_vers']))
            rejected_items.append(reason)
            return False
    if item.get('maximum_os_version'):
        max_os_vers = item['maximum_os_version']
        display.display_debug1('Considering item %s, version %s with maximum os version supported %s', item['name'], item['version'], max_os_vers)
        display.display_debug1('Our OS version is %s', machine['os_vers'])
        if (pkgutils.MunkiLooseVersion(machine['os_vers']) > pkgutils.MunkiLooseVersion(max_os_vers)):
            reason = ('Rejected item %s, version %s with maximum os version required %s. Our OS version is %s.' % (item['name'], item['version'], item['maximum_os_version'], machine['os_vers']))
            rejected_items.append(reason)
            return False
    return True