From 4ada2c37f51ea9d14bc029b620f582718ff3353a Mon Sep 17 00:00:00 2001 From: Joscha Date: Sat, 7 Dec 2019 22:22:26 +0000 Subject: [PATCH] Allow not explicitly specifying targets --- evering/config.py | 4 ++-- evering/process.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/evering/config.py b/evering/config.py index b8a8c24..0c4c785 100644 --- a/evering/config.py +++ b/evering/config.py @@ -122,8 +122,8 @@ DEFAULT_CONFIG.add( DEFAULT_CONFIG.add( "targets", - "The locations a config file should be placed in. Must be set for all files. Either a path or a list of paths", - has_constant_value=False) + "The locations a config file should be placed in. Either a path or a list of paths", + value=[]) DEFAULT_CONFIG.add( "action", diff --git a/evering/process.py b/evering/process.py index 6aecb16..275596b 100644 --- a/evering/process.py +++ b/evering/process.py @@ -109,6 +109,10 @@ class Processor: self._update_known_hash(target) def _process_parseable(self, lines: List[str], config: Config, source: Path) -> None: + if not config.targets: + logger.info(" (no targets)") + return + for target in config.targets: logger.info(f" -> {style_path(str(target))}")