Skip to content

Commit d84511a

Browse files
committed
Update oqs.py
1 parent a44565b commit d84511a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

oqs/oqs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import ctypes.util as ctu
1212
import platform # to learn the OS we're on
1313
import sys
14+
import warnings
1415

1516
# expected return value from native OQS functions
1617
OQS_SUCCESS = 0
@@ -64,6 +65,11 @@ def oqs_python_version():
6465
return pkg_resources_require("liboqs-python")[0].version
6566

6667

68+
# warn the use if the liboqs version differs from liboqs-python version
69+
if oqs_version() != oqs_python_version():
70+
warnings.warn("liboqs version {} differs from liboqs-python version {}".format(oqs_version(), oqs_python_version()))
71+
72+
6773
class MechanismNotSupportedError(Exception):
6874
"""Exception raised when an algorithm is not supported by OQS."""
6975

0 commit comments

Comments
 (0)