fixed error on line 264

This commit is contained in:
nyrrion
2024-09-16 05:46:52 +00:00
committed by GitHub
parent 09a1222d0f
commit 13b5269ca0
+12 -3
View File
@@ -259,14 +259,23 @@ def winerm():
if response == Gtk.ResponseType.YES: if response == Gtk.ResponseType.YES:
global apple_id global apple_id
global password global password
f = open(f"{(altheapath)}/saved.txt", "r") try:
with open(f"{(altheapath)}/saved.txt", "r") as f:
for line in f: for line in f:
apple_id, password = line.split("ł") # unacceptable char both in e-mail and apple id if 'ł' in line:
f.close() apple_id, password = line.split("ł")
break
else:
print("Invalid line format:", line)
continue
print(apple_id, password) print(apple_id, password)
global savedcheck global savedcheck
savedcheck = True savedcheck = True
Login().on_click_me_clicked1() Login().on_click_me_clicked1()
except ValueError as e:
print("Error reading credentials:", e)
except FileNotFoundError as e:
print("File not found:", e)
else: else:
silent_remove(f"{(altheapath)}/saved.txt") silent_remove(f"{(altheapath)}/saved.txt")
win3 = Login() win3 = Login()