tox -e genconfig error with oslo config generator

Bug #1522637 reported by Kendall Nelson
16
This bug affects 3 people
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/vagrant/tmp/cinder/.tox/pep8/bin/oslo-config-generator", line 11, in <module>
    sys.exit(main())
  File "/home/vagrant/tmp/cinder/.tox/pep8/local/lib/python2.7/site-packages/oslo_config/generator.py", line 299, in main
    generate(conf)
  File "/home/vagrant/tmp/cinder/.tox/pep8/local/lib/python2.7/site-packages/oslo_config/generator.py", line 284, in generate
    _output_opts(formatter, 'DEFAULT', groups.pop('DEFAULT'))
  File "/home/vagrant/tmp/cinder/.tox/pep8/local/lib/python2.7/site-packages/oslo_config/generator.py", line 269, in _output_opts
    f.format(opt)
  File "/home/vagrant/tmp/cinder/.tox/pep8/local/lib/python2.7/site-packages/oslo_config/generator.py", line 197, in format
    defaults = _format_defaults(opt)
  File "/home/vagrant/tmp/cinder/.tox/pep8/local/lib/python2.7/site-packages/oslo_config/generator.py", line 98, in _format_defaults
    if default_str.strip() != default_str:
AttributeError: 'int' object has no attribute 'strip'
__________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
  genconfig: commands succeeded
  congratulations :)

affects: cinder → oslo.config
Changed in oslo.config:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.config (master)

Reviewed: https://review.openstack.org/253130
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=5490a28a1398f10a3d346fef23374a972f90c40f
Submitter: Jenkins
Branch: master

commit 5490a28a1398f10a3d346fef23374a972f90c40f
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 I7cf94a1b2cbbfe67282e8a157548caff825d2811, 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
    Change-Id: I298e75afbd43bd35aba93c38129008789ed39146

Changed in oslo.config:
status: In Progress → Fix Committed
Changed in oslo.config:
milestone: none → 3.1.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.