Skip to content

Commit 6da3f51

Browse files
committed
Fix import tomllib for older versions.
Signed-off-by: Default <guilianolehmann@live.de>
1 parent 486abf4 commit 6da3f51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

oqs/oqs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
import subprocess
1818
import tempfile # to install liboqs on demand
1919
import time
20-
import tomllib
20+
try:
21+
import tomllib # Python 3.11+
22+
except ImportError: # Fallback for older versions
23+
import tomli as tomllib
2124
import warnings
2225
from os import environ
2326
from pathlib import Path

0 commit comments

Comments
 (0)