def get_pending_component_servicing():
 vname = '(Default)'
 key = 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\RebootPending'
 reg_ret = __salt__['reg.read_value']('HKLM', key, vname)
 if reg_ret['success']:
  log.debug('Found key: %s', key)
  return True
 else:
  log.debug('Unable to access key: %s', key)
 return False

def get_pending_component_servicing ( ) : vname = '(Default)' key = 'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Component Based Servicing\\RebootPending' reg_ret = __salt__ [ 'reg.read_value' ] ( 'HKLM' , key , vname ) if reg_ret [ 'success' ] : log . debug ( 'Found key: %s' , key ) return True else : log . debug ( 'Unable to access key: %s' , key ) return False
determine whether there are pending component based servicing tasks that require a reboot .