1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 01:38:21 +08:00

Merge pull request #1178 from hgjazhgj/dev

Fix: Utf-8 in BlueStacks Hyper-V connection
This commit is contained in:
LmeSzinc
2022-06-03 16:31:02 +08:00
committed by GitHub

View File

@@ -190,7 +190,7 @@ class Connection:
dir = QueryValueEx(key, 'UserDefinedDir')[0]
logger.info(f"Configuration file directory: {dir}")
with open(os.path.join(dir, 'bluestacks.conf')) as f:
with open(os.path.join(dir, 'bluestacks.conf'), encoding='utf-8') as f:
content = f.read()
port = re.search(rf'{parameter_name}="(\d+)"', content)
if port is None: