2
2
3
3
# Program that fixes LWJGL java class path data for Minecraft
4
4
# MIT License
5
- # Copyright (c) 2022-2024 CoolCat467
5
+ # Copyright (c) 2022-2025 CoolCat467
6
6
#
7
7
# Permission is hereby granted, free of charge, to any person obtaining a copy
8
8
# of this software and associated documentation files (the "Software"), to deal
35
35
36
36
__title__ = "Fix-LWJGL"
37
37
__author__ = "CoolCat467"
38
- __version__ = "1.3.3 "
38
+ __version__ = "1.3.4 "
39
39
__license__ = "MIT"
40
40
41
41
@@ -290,9 +290,8 @@ async def download_file(
290
290
or b"404: Not Found" in data
291
291
):
292
292
raise OSError (f'"{ filename } " does not exist according to "{ url } "!' )
293
- # Could have aiofiles dependency and fix this, but I would rather not.
294
- with open (filepath , "wb" ) as sfile : # noqa: ASYNC230 # sync `open`
295
- sfile .write (data )
293
+ async with await trio .open_file (filepath , "wb" ) as fp :
294
+ await fp .write (data )
296
295
return filepath
297
296
298
297
@@ -616,12 +615,14 @@ def run(args: list[str]) -> int:
616
615
if config .has_option ("main" , "lwjgl_base_path" ):
617
616
base_path = config .get ("main" , "lwjgl_base_path" )
618
617
BASE_FOLDER = os .path .expanduser (base_path )
619
- log ("Loaded lwjgl base path from config file." )
618
+ log (f "Loaded lwjgl base path from config file. ( { BASE_FOLDER !r } ) " )
620
619
else :
621
620
rewrite_config = True
622
621
if config .has_option ("main" , "can_download" ):
623
622
ALLOWED_TO_DOWNLOAD = config .getboolean ("main" , "can_download" )
624
- log ("Loaded if allowed to download from config file." )
623
+ log (
624
+ f"Loaded if allowed to download from config file. ({ ALLOWED_TO_DOWNLOAD !r} )" ,
625
+ )
625
626
else :
626
627
rewrite_config = True
627
628
if config .has_option ("main" , "download_timeout" ):
@@ -630,7 +631,7 @@ def run(args: list[str]) -> int:
630
631
TIMEOUT = None
631
632
else :
632
633
TIMEOUT = config .getint ("main" , "download_timeout" )
633
- log ("Loaded download timeout from config file." )
634
+ log (f "Loaded download timeout from config file. ( { TIMEOUT !r } ) " )
634
635
else :
635
636
rewrite_config = True
636
637
else :
0 commit comments