fatal kwarg on option does not allow --help on cli for non existing config files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
configglue |
Fix Released
|
Undecided
|
Ricardo Kirkner |
Bug Description
When an option in a schema has the fatal kwarg set to True, we cannot issue a `--help` on the console, raises ConfigParser.
This happens while there's no config file yet.
This should only happen if not passing `--help` and should be raised in a cleaner way, not something like:
Traceback (most recent call last):
File "tests/
op, opts, args = schemaconfigglu
File "/home/
kwargs[
File "/home/
raw, vars)
File "/usr/lib/
raise NoOptionError(
ConfigParser.
Related branches
- Ricardo Kirkner: Approve
- Łukasz Czyżykowski (community): Approve
-
Diff: 312 lines (+82/-57)7 files modifiedconfigglue/app/tests/test_base.py (+2/-2)
configglue/pyschema/glue.py (+11/-3)
configglue/pyschema/parser.py (+31/-41)
configglue/pyschema/schema.py (+8/-2)
configglue/tests/pyschema/test_parser.py (+6/-8)
configglue/tests/pyschema/test_schema.py (+2/-1)
configglue/tests/pyschema/test_schemaconfig.py (+22/-0)
Changed in configglue: | |
status: | New → In Progress |
assignee: | nobody → Ricardo Kirkner (ricardokirkner) |
Changed in configglue: | |
status: | In Progress → Fix Committed |
Changed in configglue: | |
milestone: | none → 0.11 |
status: | Fix Committed → Fix Released |
Seems that like this we can't event write a default config file with the basic schema defaults.