diff --git a/src/batou/component.py b/src/batou/component.py index 0e4548bd..65343f28 100644 --- a/src/batou/component.py +++ b/src/batou/component.py @@ -655,9 +655,9 @@ def require_one( key, host ) ) - elif len(resources) == 0: + elif len(resources) == 0 and strict: raise SilentConfigurationError() - return resources[0] + return resources[0] if resources else None def assert_cmd(self, *args, **kw): """Assert that given command returns successfully, raise