ThiaudioTT / hoi4-presence

Hearts of Iron IV presence for Discord!
MIT License
13 stars 10 forks source link

[BUG] - Checkupdate isn't working #22

Closed ThiaudioTT closed 1 year ago

ThiaudioTT commented 1 year ago

Describe the bug

I think checkupdate isn't working somehow

Wolfmyths commented 1 year ago

I looked at the code and I didn't see anything wrong, but this was something that should be looked at.

https://github.com/ThiaudioTT/hoi4-presence/blob/main/src/checkupdate/checkupdate.py#L19

It's good practice to use a with statement here so it automatically closes the file once it's out of scope.

One thing you could try is import checkupdate.py and run that through the main script instead of runRPC.bat and see what happens there. This would also remove the need for another exe and lessen storage size.

ThiaudioTT commented 1 year ago

I tested this at most recent version (1.0.1) and checkupdate was working fine.

It's good practice to use a with statement here so it automatically closes the file once it's out of scope.

You are right, this file is the most in the need of refactor right now.


I will close this issue since there's nothing wrong.