Beispiel #1
0
    def __get_password_ui(self,pswd_msg='', user ="******"):
        if pswd_msg == '':
            pswd_msg = "Your HP Device requires to install HP proprietary plugin\nPlease enter root/superuser password to continue"

        if self.__ui_toolkit == "qt3":
            from ui.setupform import showPasswordUI
            username, password = showPasswordUI(pswd_msg, user, False)
        else:       #self.__ui_toolkit == "qt4" --> default qt4
            from ui4.setupdialog import showPasswordUI
            username, password = showPasswordUI(pswd_msg, user, False)

        if username == "" and password == "":
            raise Exception("User Cancel")
            
        return  password
Beispiel #2
0
    def __get_password_ui(self, pswd_msg='', user="******"):
        if pswd_msg == '':
            pswd_msg = "Your HP Device requires to install HP proprietary plugin\nPlease enter root/superuser password to continue"

        if self.__ui_toolkit == "qt3":
            from ui.setupform import showPasswordUI
            username, password = showPasswordUI(pswd_msg, user, False)
        else:  #self.__ui_toolkit == "qt4" --> default qt4
            from ui4.setupdialog import showPasswordUI
            username, password = showPasswordUI(pswd_msg, user, False)

        if username == "" and password == "":
            raise Exception("User Cancel")

        return password