未验证 提交 55c4715a 编写于 作者: L littletomatodonkey 提交者: GitHub

fix warning for index.so compliation (#920)

上级 b43c72db
......@@ -29,7 +29,14 @@ if platform.system() == "Windows":
else:
lib_filename = "index.so"
so_path = os.path.join(__dir__, lib_filename)
lib = ctypes.cdll.LoadLibrary(so_path)
try:
lib = ctypes.cdll.LoadLibrary(so_path)
except Exception as ex:
readme_path = os.path.join(__dir__, "README.md")
print(
f"Error happened when load lib {so_path} with msg {ex},\nplease refer to {readme_path} to rebuild your library."
)
exit(-1)
class IndexContext(Structure):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册