Skip to content

Commit 3866549

Browse files
committed
Add encoding='utf-8' when opening in text mode
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
1 parent 191c630 commit 3866549

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Deploy.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@
5656
NUITKA_BINARY_VERSION_OPTION += f'--file-description=\"A GUI proxy client based on PySide6. Support Xray-core & hysteria\" '
5757

5858
if PLATFORM == 'Windows' or PLATFORM == 'Darwin':
59-
NUITKA_BINARY_VERSION_OPTION += (
60-
f'--copyright=\"Copyright (C) 2024–present Loren Eteval & contributors <loren.eteval@proton.me>\" '
61-
)
59+
NUITKA_BINARY_VERSION_OPTION += f'--copyright=\"Copyright (C) 2024–present Loren Eteval & contributors <loren.eteval@proton.me>\" '
6260

6361
if PLATFORM == 'Windows':
6462
NUITKA_BUILD = (
@@ -233,7 +231,11 @@ def writeHy1Rules(response, pattern_, action_, file_):
233231

234232
pattern = re.compile(r'([a-z]|[0-9]|[A-Z])(.*[a-z]|[A-Z])')
235233

236-
with open(HYSTERIA_DATA_DIR / 'bypass-mainland-China.acl', 'w') as file:
234+
with open(
235+
HYSTERIA_DATA_DIR / 'bypass-mainland-China.acl',
236+
'w',
237+
encoding='utf-8',
238+
) as file:
237239
file.write(
238240
f'# Author:github.com/A1-hub\n'
239241
f'# Author:github.com/{APPLICATION_REPO_OWNER_NAME}\n'

Furious/Core/CoreManager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def fixLogObjectPath(config: ConfigurationFactory, attr: str, value: str, log=Tr
6262
if result:
6363
try:
6464
# Create a new file
65-
with open(result, 'x'):
65+
with open(result, 'x', encoding='utf-8'):
6666
pass
6767
except FileExistsError:
6868
pass

0 commit comments

Comments
 (0)