Add some doc about CLI option and better informative message

This commit is contained in:
Lucas Verney 2017-06-19 17:20:53 +02:00
parent 082d177f19
commit 6e12490fbd
2 changed files with 6 additions and 1 deletions

View File

@ -53,6 +53,9 @@ You can pass some command-line arguments to Flatisfy commands, common to all the
* `--max-entries N` to overload the `max_entries` value from config.
* `-v` to enable verbose output.
* `-vv` to enable debug output.
* `--constraints` to specify a list of constraints to use (e.g. to restrict
import to a subset of available constraints from the config). This list
should be passed as a comma-separated list.
## Configuration

View File

@ -231,7 +231,9 @@ def load_config(args=None):
# Handle constraints filtering
if args and getattr(args, "constraints", None) is not None:
LOGGER.info(
"Filtering constraints from config according to CLI argument."
("Filtering constraints from config according to CLI argument. "
"Using only the following constraints: %s."),
args.constraints.replace(",", ", ")
)
constraints_filter = args.constraints.split(",")
config_data["constraints"] = {