Skip to content

Commit 4d81b07

Browse files
committed
text=True
1 parent 9b8a71a commit 4d81b07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

onlinejudge_verify/languages/csharp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def _check_dotnet_version() -> None:
2222
raise RuntimeError('`dotnet` not in $PATH')
2323
command = ['dotnet', '--version']
2424
logger.info('$ %s', ' '.join(command))
25-
res = subprocess.check_output(command).decode().strip()
25+
res = subprocess.check_output(command, text=True).strip()
2626
logger.info('dotnet version: %s', res)
2727
if distutils.version.LooseVersion(res) <= distutils.version.LooseVersion("6"):
2828
raise RuntimeError("oj-verify needs .NET 6 SDK or newer")
@@ -34,7 +34,7 @@ def _check_expander_console() -> None:
3434
raise RuntimeError('`dotnet-source-expand` not in $PATH. Run `dotnet tool install -g SourceExpander.Console`')
3535
command = ['dotnet-source-expand', 'version']
3636
logger.info('$ %s', ' '.join(command))
37-
res = subprocess.check_output(command).decode().strip()
37+
res = subprocess.check_output(command, text=True).strip()
3838
logger.info('dotnet-source-expand version: %s', res)
3939
if distutils.version.LooseVersion(res) < distutils.version.LooseVersion("5"):
4040
raise RuntimeError('`dotnet-source-expand` version must be 5.0.0 or newer. Update SourceExpander.Console. `dotnet tool update -g SourceExpander.Console`')

0 commit comments

Comments
 (0)