Pythonユーザー判断の追加

2208 ワード

    def saveRegistData(self):
        """    """
        print("    ")
        saveDataPath=os.path.join(os.getcwd(),"config","accout.json")
        accountType=self.accoutTypeComboBox.currentText() #     
        account=self.account_le.text().strip() #     
        accountName=self.accountName_le.text() #     
        accountPhone=self.accountPhone_le.text() #       
        accountPwd=self.password_le.text() #     
        accountConfirePwd=self.confirm_pwd_le.text() #       
        #             
        configPath = os.path.join(os.getcwd(), "config", "config.json")
        #       
        isContainChinese=self.isContainChinese(accountName)
        #             
        try:
            dboperate=DBOperate.DBOperate()
            querySql="SELECT * FROM config_paras"
            paras=dboperate.QueryAsDict(querySql)[0]
        except Exception as ex:
            print(f"          
{ex}") else: accountMinChar = int(paras.get("accountMinChar", 5)) accountNameContainChineseMinChar = int(paras.get("accountNameContainChineseMinChar", 6)) accountNameNotContainChineseMinChar = int(paras.get("accountNameNotContainChineseMinChar", 5)) accountPwdMinChar = int(paras.get("accountPwdMinChar", 6)) dboperate.CloseDB() if len(account.encode())