diff --git a/scripts/utils.py b/scripts/utils.py index 8a201be0..269b3824 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -2,13 +2,16 @@ Shared functions between various scripts """ import re -import sys try: import tomllib except ModuleNotFoundError: # pre-Python 3.11 compatibility - import toml as tomllib + try: + import toml as tomllib + except ModuleNotFoundError: + print("WARNING: Could not find tomllib or toml, Poetry support unavailable.") + from pathlib import Path RE_NAME = re.compile(r'name="(.*?)"')