register_cli_opts() does not work after register_opts()
Bug #1363808 reported by
Baohua Yang
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo-incubator |
Incomplete
|
Undecided
|
Unassigned | ||
oslo-config (Ubuntu) |
Invalid
|
Undecided
|
Baohua Yang |
Bug Description
The following code will not register the common_opts as cli options, unless we put register_cli_opts() ahead of register_opts()
==================
import sys
from oslo.config import cfg
if __name__ == "__main__":
common_opts = [ cfg.StrOpt(
CONF = cfg.CONF
CONF.
CONF.
CONF(
===================
I think the usage order should not affect the registration.
Changed in oslo-config (Ubuntu): | |
assignee: | nobody → Baohua Yang (yangbaohua) |
status: | New → Confirmed |
status: | Confirmed → Fix Committed |
Changed in oslo-config (Ubuntu): | |
status: | Fix Committed → Confirmed |
Changed in oslo-config (Ubuntu): | |
status: | Confirmed → In Progress |
To post a comment you must log in.
I'm not sure this is really a bug. Command line options must all be registered before the command line arguments are parsed. File-only options can be registered at any point while the program is running.