summaryrefslogtreecommitdiff
path: root/wrappers/python/src/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/python/src/__init__.py')
-rw-r--r--wrappers/python/src/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/wrappers/python/src/__init__.py b/wrappers/python/src/__init__.py
index 8129495..1ec0bec 100644
--- a/wrappers/python/src/__init__.py
+++ b/wrappers/python/src/__init__.py
@@ -23,8 +23,15 @@ _os = platform.system().lower()
_libname = "eduvpn_common"
_libfile = f"{_lib_prefixes[_os]}{_libname}{_lib_suffixes[_os]}"
-# Library should have been copied to the lib/ folder
-lib = cdll.LoadLibrary(str(pathlib.Path(__file__).parent / "lib" / _libfile))
+
+lib = None
+
+# Try to load in the normal path
+try:
+ lib = cdll.LoadLibrary(_libfile)
+# Otherwise, library should have been copied to the lib/ folder
+except:
+ lib = cdll.LoadLibrary(str(pathlib.Path(__file__).parent / "lib" / _libfile))
class DataError(Structure):