Compare commits

...

2 commits

2 changed files with 18 additions and 3 deletions

View file

@ -103,12 +103,26 @@ class Lock(customtkinter.CTkToplevel):
"pc_number": int(client_config["pc_number"]),
"password": self.hash_genarate(str(self.password_entry.get()))
}
responce = requests.post(auth_url, json=auth_json)
try:
responce = requests.post(auth_url, json=auth_json)
except:
master_password_hash = self.hash_genarate(str(self.password_entry.get()))
if client_config["master_password_hash"] == master_password_hash:
self.destroy()
app.exit()
else:
self.msg_subtitle_1.configure(text='サインインするには、パスワードが必要です。\nネットワークエラーが発生しています。\n続行するには、マスターパスワードを入力して下さい。')
if responce.status_code == 200:
self.destroy()
app.exit()
else:
self.msg_subtitle_1.configure(text='サインインするには、パスワードが必要です。\nパスワードが違います!')
master_password_hash = self.hash_genarate(str(self.password_entry.get()))
if client_config["master_password_hash"] == master_password_hash:
self.destroy()
app.exit()
else:
self.msg_subtitle_1.configure(text='サインインするには、パスワードが必要です。\nパスワードが違います!')
def handler_close(self):
pass

View file

@ -4,4 +4,5 @@ flask-login
psycopg2-binary
winotify
customtkinter
keyboard
keyboard
requests