Skip to content

Commit

Permalink
[GR-47806] Code owners: fix toml module use.
Browse files Browse the repository at this point in the history
PullRequest: mx/1686
  • Loading branch information
Vojtech Horky committed Oct 6, 2023
2 parents f7ef993 + ab2660a commit dfef780
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mx.py
Original file line number Diff line number Diff line change
Expand Up @@ -18831,7 +18831,7 @@ def alarm_handler(signum, frame):
abort(1, killsig=signal.SIGINT)

# The version must be updated for every PR (checked in CI) and the comment should reflect the PR's issue
version = VersionSpec("6.51.0") # GR-49282 mx cmake features and tar.bz2 support
version = VersionSpec("6.51.1") # GR-47806 Code owners: fix toml module use

_mx_start_datetime = datetime.utcnow()
_last_timestamp = _mx_start_datetime
Expand Down
5 changes: 4 additions & 1 deletion mx_codeowners.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def _load_toml_from_fd(fd):
try:
import toml
try:
return toml.load(fd)
# This is kind of confusing because tomllib expects 'rb',
# toml expects 'rt' mode when reading from a file and for
# mx_stoml we also decode from UTF-8 ourselves explicitly.
return toml.loads(fd.read().decode('utf-8'))
except toml.TomlDecodeError as e:
raise _TomlParsingException(e)
except ImportError:
Expand Down

0 comments on commit dfef780

Please sign in to comment.