def __init__(self):
        '''
        Initialize the session and load all updates into the ``_updates``
        collection. This collection is used by the other class functions instead
        of querying Windows update (expensive).

        Need to look at the possibility of loading this into ``__context__``
        '''
        # Initialize the PyCom system
        with salt.utils.winapi.Com():

            # Create a session with the Windows Update Agent
            self._session = win32com.client.Dispatch('Microsoft.Update.Session')

            # Create Collection for Updates
            self._updates = win32com.client.Dispatch('Microsoft.Update.UpdateColl')

        self.refresh()
def __init__ ( self ) : with salt . utils . winapi . Com ( ) : self . _session = win32com . client . Dispatch ( 'Microsoft.Update.Session' ) self . _updates = win32com . client . Dispatch ( 'Microsoft.Update.UpdateColl' ) self . refresh ( )
Initialize the session and load all updates into the ``_updates``
        collection. This collection is used by the other class functions instead
        of querying Windows update (expensive).

        Need to look at the possibility of loading this into ``__context__``