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"]), "pc_number": int(client_config["pc_number"]),
"password": self.hash_genarate(str(self.password_entry.get())) "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: if responce.status_code == 200:
self.destroy() self.destroy()
app.exit() app.exit()
else: 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): def handler_close(self):
pass pass

View file

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