def get_pending_servermanager():
 vname = 'CurrentRebootAttempts'
 key = 'SOFTWARE\\Microsoft\\ServerManager'
 reg_ret = __salt__['reg.read_value']('HKLM', key, vname)
 if reg_ret['success']:
  log.debug('Found key: %s', key)
  try:
   if (int(reg_ret['vdata']) > 0):
    return True
  except ValueError:
   pass
 else:
  log.debug('Unable to access key: %s', key)
 return False

def get_pending_servermanager ( ) : vname = 'CurrentRebootAttempts' key = 'SOFTWARE\\Microsoft\\ServerManager' reg_ret = __salt__ [ 'reg.read_value' ] ( 'HKLM' , key , vname ) if reg_ret [ 'success' ] : log . debug ( 'Found key: %s' , key ) try : if ( int ( reg_ret [ 'vdata' ] ) > 0 ) : return True except ValueError : pass else : log . debug ( 'Unable to access key: %s' , key ) return False
determine whether there are pending server manager tasks that require a reboot .