def get_pending_servermanager():
    '''
    Determine whether there are pending Server Manager tasks that require a reboot.

    :return: A boolean representing whether there are pending Server Manager tasks.
    :rtype: bool

    .. versionadded:: Carbon

    CLI Example:

    .. code-block:: bash

        salt '*' system.get_pending_servermanager
    '''
    vname = 'CurrentRebootAttempts'
    key = r'SOFTWARE\Microsoft\ServerManager'

    # There are situations where it's possible to have '(value not set)' as
    # the value data, and since an actual reboot wont be pending in that
    # instance, just catch instances where we try unsuccessfully to cast as int.

    reg_ret = read_value('HKLM', key, vname)

    if reg_ret['success']:
        log.debug('Found key: %s', key)

        try:
            if 0 > int(reg_ret['vdata']):
                return True
        except ValueError:
            pass
    else:
        log.debug('Unable to access key: %s', key)
    return False
dataset/ETHPy150Open saltstack/salt/salt/modules/win_system.py/get_pending_servermanager/swapped operands of `>`