File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -607,9 +607,10 @@ def get_plugin_config(
607607
608608 # use default config if not found
609609 if not file_path :
610- file_path = files .get_abs_path (
611- find_plugin_dir (plugin_name ), CONFIG_DEFAULT_FILE_NAME
612- )
610+ plugin_dir = find_plugin_dir (plugin_name )
611+ if not plugin_dir :
612+ return None
613+ file_path = files .get_abs_path (plugin_dir , CONFIG_DEFAULT_FILE_NAME )
613614 default_used = True
614615
615616 result = None
@@ -635,9 +636,11 @@ def get_plugin_config(
635636
636637
637638def get_default_plugin_config (plugin_name : str ):
638- file_path = files .get_abs_path (
639- find_plugin_dir (plugin_name ), CONFIG_DEFAULT_FILE_NAME
640- )
639+ plugin_dir = find_plugin_dir (plugin_name )
640+ if not plugin_dir :
641+ return None
642+
643+ file_path = files .get_abs_path (plugin_dir , CONFIG_DEFAULT_FILE_NAME )
641644
642645 # call plugin hook to get the result
643646 result = call_plugin_hook (
You can’t perform that action at this time.
0 commit comments