def needs_reboot():
 pythoncom.CoInitialize()
 obj_sys = win32com.client.Dispatch('Microsoft.Update.SystemInfo')
 return salt.utils.is_true(obj_sys.RebootRequired)

def needs_reboot ( ) : pythoncom . CoInitialize ( ) obj_sys = win32com . client . Dispatch ( 'Microsoft.Update.SystemInfo' ) return salt . utils . is_true ( obj_sys . RebootRequired )
determines if the system needs to be rebooted .