configglue team mailing list archive
-
configglue team
-
Mailing list archive
-
Message #00182
[Bug 757955] Re: fatal kwarg on option does not allow --help on cli for non existing config files
** Changed in: configglue
Milestone: None => 0.11
** Changed in: configglue
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of
Configglue developers, which is the registrant for configglue.
https://bugs.launchpad.net/bugs/757955
Title:
fatal kwarg on option does not allow --help on cli for non existing
config files
Status in configglue:
Fix Released
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.NoOptionError.
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/cfglue_test.py", line 65, in <module>
op, opts, args = schemaconfigglue(scp)
File "/home/vampas/projects/.virtual_python/lib/python2.6/site-packages/configglue/pyschema/glue.py", line 62, in schemaconfigglue
kwargs['default'] = parser.get(section.name, option.name)
File "/home/vampas/projects/.virtual_python/lib/python2.6/site-packages/configglue/pyschema/parser.py", line 457, in get
raw, vars)
File "/usr/lib/python2.6/ConfigParser.py", line 541, in get
raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'network' in section: '__main__
To manage notifications about this bug go to:
https://bugs.launchpad.net/configglue/+bug/757955/+subscriptions
References