Skip to content

Commit a7da845

Browse files
committed
removes use of tomllib
1 parent bbc770d commit a7da845

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

builder/toml_reader.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,12 @@
11
import os
22

33
try:
4-
import tomllib as toml
4+
import toml
55
except ImportError:
6-
try:
7-
import toml
8-
except ImportError:
9-
raise RuntimeError(
10-
'A "toml" library is needed to read a .toml file\n'
11-
'One is included with Python 3.11+ or you can install \n'
12-
'into your current version of Python using the following command:\n'
13-
'\n'
14-
'pip3 install toml'
15-
)
16-
6+
raise RuntimeError(
7+
'The toml library is needed to use this feature.\n'
8+
'Please run "pip3 install toml" and then restart your build'
9+
)
1710

1811
used_imports = []
1912
global_variable_names = []

0 commit comments

Comments
 (0)