File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515#
16-
16+ import logging
1717import os
1818import importlib
1919import inspect
@@ -50,9 +50,10 @@ def _extract_classes_from_module(module: ModuleType) -> None:
5050
5151
5252def component_class (class_name ):
53- for mdl in ["agent.component" , "agent.tools" , "rag.flow" ]:
53+ for module_name in ["agent.component" , "agent.tools" , "rag.flow" ]:
5454 try :
55- return getattr (importlib .import_module (mdl ), class_name )
56- except Exception :
55+ return getattr (importlib .import_module (module_name ), class_name )
56+ except Exception as e :
57+ logging .warning (f"Can't import module: { module_name } , error: { e } " )
5758 pass
5859 assert False , f"Can't import { class_name } "
You can’t perform that action at this time.
0 commit comments