File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
gpustack_runtime/detector/pymxsml Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 213213MXSML_ERROR_MMIO_NOT_ENOUGH = 24
214214MXSML_ERROR_GET_PCI_BRIDGE_FAILURE = 25
215215MXSML_ERROR_LOAD_DLL_FAILURE = 26
216+ MXSML_ERROR_FUNCTION_NOT_FOUND = 999
216217
217218_mxSmlMetaXLinkState_t = c_uint
218219MXSML_MetaXLink_State_Enabled = 0
@@ -708,8 +709,11 @@ def _mxsmlGetFunctionPointer(name):
708709 if mxSmlLib == None :
709710 raise MXSMLError (MXSML_ERROR_FAILURE )
710711
711- _mxsmlFunctionPointerCache [name ] = getattr (mxSmlLib , name )
712- return _mxsmlFunctionPointerCache [name ]
712+ try :
713+ _mxsmlFunctionPointerCache [name ] = getattr (mxSmlLib , name )
714+ return _mxsmlFunctionPointerCache [name ]
715+ except AttributeError :
716+ raise MXSMLError (MXSML_ERROR_FUNCTION_NOT_FOUND )
713717
714718
715719## string/bytes conversion for ease of use
You can’t perform that action at this time.
0 commit comments