Index: pluginconf/__init__.py ================================================================== --- pluginconf/__init__.py +++ pluginconf/__init__.py @@ -185,11 +185,11 @@ # Resource retrieval # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ @renamed_arguments({"fn": "filename", "gz": "gzip"}) -def get_data(filename, decode=False, gzip=False, file_root=None): +def get_data(filename, decode=False, gzip=False, file_root=None, warn=True): """ Fetches file content from install path or from within PYZ archive. This is just an alias and convenience wrapper for pkgutil.get_data(). Utilizes the data_root as top-level reference. @@ -208,11 +208,12 @@ data = gzip_decode(data) if decode: return data.decode("utf-8", errors='ignore') return str(data) except: #(FileNotFoundError, IOError, OSError, ImportError, gzip.BadGzipFile): - log.warning("get_data() didn't find '%s' in '%s'", filename, file_root) + if warn: + log.warning("get_data() didn't find '%s' in '%s'", filename, file_root) # Plugin name lookup # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ def module_list(extra_paths=None): @@ -289,15 +290,17 @@ if module: search = plugin_base + kwargs.get("extra_base", []) for base, sfx in itertools.product(search, [".py", "/__init__.py"]): try: #log.debug(f"mod={base} fn={filename}.py") - src = get_data(filename=module+sfx, decode=True, file_root=base) + src = get_data(filename=module+sfx, decode=True, file_root=base, warn=False) if src: break except (IOError, OSError, FileNotFoundError): continue # plugin_meta_extract() will print a notice later + else: + log.warning("Found no source candidate for '%s'", module) filename = module # Real filename/path elif filename and os.path.exists(filename): src = open(filename).read(kwargs.get("max_length", 6144))