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

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

It checks the repositories for new updates in the update-manager application.

This action requires administrative permissions, therefore this method will
raise an error if the UpdateManager instance was created without password.

Definition at line 331 of file ubuntu.py.

00331                            :
        """
        It checks the repositories for new updates in the update-manager application.
        
        This action requires administrative permissions, therefore this method will
        raise an error if the UpdateManager instance was created without password.
        """

        try:
            updateManager = ooldtp.context(self.name)
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "The Update Manager window was not found."
        
        if self.password == "":
            raise ldtp.LdtpExecutionError, "Checking for updates requires administrative permissions."

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

        try:
            checkButton = updateManager.getchild(self.BTN_CHECK)
        except ldtp.LdtpExecutionError:
            raise ldtp.LdtpExecutionError, "The Update Manager Check button was not found."
          
        checkButton.click()
 
        # Administrative permissions
        if polKit.wait():
            # HACK
            ldtp.wait(2)
            polKit.set_password()
        
        # HACK to wait for repositories
        ldtp.wait(20)

    def install_updates(self):


Generated by  Doxygen 1.6.0   Back to index