Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::application::ubuntu::UpdateManager::install_updates (   self  ) 

It installs the selected updates. 

If no updates are available, it won't do anything.

Definition at line 367 of file ubuntu.py.

00367                              :
        """
        It installs the selected updates. 
        
        If no updates are available, it won't do anything.
        """

        try:
            updateManager = ooldtp.context(self.name)
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "The Update Manager window was not found."

        # If there is any update available, install it
        if self.number_updates() > 0:
            
            try:
                btnInstall = updateManager.getchild(self.BTN_INSTALL)
            except ldtp.LdtpExecutionError:
                raise ldtp.LdtpExecutionError, "The Update Manager install button was not found."
            
            if btnInstall.stateenabled():
                btnInstall.click()

                # We will need administrative permission
                polKit = PolicyKit(self.password)

               # Administrative permissions
                if polKit.wait():
                    # HACK
                    ldtp.wait(2)
                    polKit.set_password()
        
        # Wait for the the close button to be ready
        try:
            btnClose = updateManager.getchild(self.BTN_CLOSE)
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "The Update Manager Close button was not found."
        
        while not btnClose.stateenabled():
            ldtp.wait(5)
            
    def test_install_state(self):


Generated by  Doxygen 1.6.0   Back to index