tox -e genconfig error with oslo config generator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.config |
Fix Released
|
Undecided
|
Davanum Srinivas (DIMS) |
Bug Description
When you run tox -e genconfig it throws the following traceback but says the sample file has still been successfully generated.
Traceback (most recent call last):
File "/home/
sys.
File "/home/
generate(conf)
File "/home/
_output_
File "/home/
f.format(opt)
File "/home/
defaults = _format_
File "/home/
if default_str.strip() != default_str:
AttributeError: 'int' object has no attribute 'strip'
_______
genconfig: commands succeeded
congratulations :)
affects: | cinder → oslo.config |
Changed in oslo.config: | |
assignee: | nobody → Davanum Srinivas (DIMS) (dims-v) |
status: | New → In Progress |
Changed in oslo.config: | |
milestone: | none → 3.1.0 |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /review. openstack. org/253130 /git.openstack. org/cgit/ openstack/ oslo.config/ commit/ ?id=5490a28a139 8f10a3d346fef23 374a972f90c40f
Committed: https:/
Submitter: Jenkins
Branch: master
commit 5490a28a1398f10 a3d346fef23374a 972f90c40f
Author: Davanum Srinivas <email address hidden>
Date: Thu Dec 3 13:41:38 2015 -0500
[fix-compat] Support older use case for Opt type
In I7cf94a1b2cbbfe 67282e8a157548c aff825d2811, we we moved
type formatting from generator to type, however we still have
some older code/libraries that were using a Opt with a type
set to a string. We need to support them until we find and
fix all use cases. So we explicitly check if format_defaults
is present and call it if it is. If format_defaults is
not present we call the older code from the change id
mentioned above.
Closes-Bug: #1522637 35aba93c3812900 8789ed39146
Change-Id: I298e75afbd43bd