mirror of
https://github.com/LTTLabsOSS/markbench-tests.git
synced 2026-04-24 03:01:09 -04:00
fix type error (#47)
- Fix type error - Make error log slightly more descriptive
This commit is contained in:
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
Changes are grouped by the date they are merged to the main branch of the repository and are ordered from newest to oldest. Dates use the ISO 8601 extended calendar date format, i.e. YYYY-MM-DD.
|
||||
|
||||
## 2024-02-20
|
||||
|
||||
- Fix type error in DOTA2 `read_config` utility function
|
||||
|
||||
## 2024-02-16
|
||||
|
||||
- Update DOTA 2 test utils script to check for alternative file path when attempting to read video config file if initial file is not found
|
||||
|
||||
@@ -84,13 +84,13 @@ def copy_config() -> None:
|
||||
|
||||
def read_config() -> list[str] | None:
|
||||
"""Looks for config file and returns contents if found"""
|
||||
userdata_path = Path(get_steam_folder_path(), "userdata", STEAM_USER_ID, STEAM_GAME_ID, "local", "cfg", "video.txt")
|
||||
userdata_path = Path(get_steam_folder_path(), "userdata", str(STEAM_USER_ID), str(STEAM_GAME_ID), "local", "cfg", "video.txt")
|
||||
install_path = Path(get_install_path(), "game", "dota", "cfg", "video.txt")
|
||||
try:
|
||||
with open(userdata_path, encoding="utf-8") as f:
|
||||
return f.readlines()
|
||||
except OSError:
|
||||
logging.error("Did not find config file at path %s", userdata_path)
|
||||
logging.error("Did not find config file at path %s. Trying path %s", userdata_path, install_path)
|
||||
try:
|
||||
with open(install_path, encoding="utf-8") as f:
|
||||
return f.readlines()
|
||||
|
||||
Reference in New Issue
Block a user