Skip to content

Commit 762b1d8

Browse files
committed
Support tomli and tomllib
This makes it easier to run on jenkins with python 3.10.
1 parent 7c87010 commit 762b1d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/lsst/sconsUtils/tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,10 @@ def runPythonLinter(self):
317317

318318
pyproject = os.path.join(root, "pyproject.toml")
319319
if os.path.exists(pyproject):
320-
import tomllib
320+
try:
321+
import tomllib
322+
except ImportError:
323+
import tomli as tomllib
321324

322325
with open(pyproject) as fh:
323326
try:

0 commit comments

Comments
 (0)