From 76e90dd23a81c54f1eb5ddcd30cf85064eaecb88 Mon Sep 17 00:00:00 2001 From: Patrick Robertson Date: Wed, 26 Mar 2025 15:34:33 +0400 Subject: [PATCH] Small code tidy ups --- src/auto_archiver/core/module.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/auto_archiver/core/module.py b/src/auto_archiver/core/module.py index 3fdc3ae..1494fd6 100644 --- a/src/auto_archiver/core/module.py +++ b/src/auto_archiver/core/module.py @@ -214,11 +214,8 @@ class LazyBaseModule: # check external dependencies are installed def check_deps(deps, check): - for dep in deps: - if not len(dep): - # clear out any empty strings that a user may have erroneously added - continue - if not check(dep): + for dep in filter(lambda d: len(d.strip()), deps): + if not check(dep.strip()): logger.error( f"Module '{self.name}' requires external dependency '{dep}' which is not available/setup. \ Have you installed the required dependencies for the '{self.name}' module? See the documentation for more information."