LttP: fix deprecated use of isSet() (#831)

This commit is contained in:
Fabian Dill 2022-07-27 22:21:06 +02:00 committed by GitHub
parent c61f77029b
commit 73afab67c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -289,7 +289,7 @@ def run_sprite_update():
else: else:
top.withdraw() top.withdraw()
task = BackgroundTaskProgress(top, update_sprites, "Updating Sprites", lambda succesful, resultmessage: done.set()) task = BackgroundTaskProgress(top, update_sprites, "Updating Sprites", lambda succesful, resultmessage: done.set())
while not done.isSet(): while not done.is_set():
task.do_events() task.do_events()
logging.info("Done updating sprites") logging.info("Done updating sprites")
@ -300,6 +300,7 @@ def update_sprites(task, on_finish=None):
sprite_dir = user_path("data", "sprites", "alttpr") sprite_dir = user_path("data", "sprites", "alttpr")
os.makedirs(sprite_dir, exist_ok=True) os.makedirs(sprite_dir, exist_ok=True)
ctx = get_cert_none_ssl_context() ctx = get_cert_none_ssl_context()
def finished(): def finished():
task.close_window() task.close_window()
if on_finish: if on_finish: