Fix Windows not being able to open the wakatime cfg due to BOM existence

This commit is contained in:
csd4ni3l
2025-09-07 21:19:23 +02:00
parent 33bfb48aa3
commit 35b6e0a35f

View File

@@ -12,7 +12,8 @@ class Client:
sys.exit(1)
self.config = configparser.ConfigParser()
self.config.read(wakatime_config_path)
with open(wakatime_config_path, encoding="utf-8-sig") as f:
self.config.read_file(f)
self.api_url = HACKATIME_URL
self.api_key = self.config["settings"]["api_key"]