Handle BOM in weather report token file
This commit is contained in:
@@ -127,7 +127,7 @@ def read_token(token_file: str) -> str:
|
||||
if token:
|
||||
return token
|
||||
try:
|
||||
with open(token_file, "r", encoding="utf-8") as handle:
|
||||
with open(token_file, "r", encoding="utf-8-sig") as handle:
|
||||
token = handle.read().strip()
|
||||
except FileNotFoundError as exc:
|
||||
raise WeatherReportError(
|
||||
|
||||
Reference in New Issue
Block a user