def get_pending_update():
    '''
    Determine whether there are pending updates that require a reboot.

    .. versionadded:: 2016.11.0

    Returns:
        bool: ``True`` if there are pending updates, otherwise ``False``

    CLI Example:

    .. code-block:: bash

        salt '*' system.get_pending_update
    '''
    key = r'SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired'

    # So long as the registry key exists, a reboot is pending.
    if __utils__['reg.key_exists']('HKLM', key):
        log.debug('Key exists: %s', key)
        return True
    else:
        log.debug('Key does not exist: %s', key)

    return False
def get_pending_update ( ) : key = r'SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired' if __utils__ [ 'reg.key_exists' ] ( 'HKLM' , key ) : log . debug ( 'Key exists: %s' , key ) return True else : log . debug ( 'Key does not exist: %s' , key ) return False
Determine whether there are pending updates that require a reboot.

    .. versionadded:: 2016.11.0

    Returns:
        bool: ``True`` if there are pending updates, otherwise ``False``

    CLI Example:

    .. code-block:: bash

        salt '*' system.get_pending_update