config/generator.py crashes when no help in conf

Bug #1194524 reported by Thomas Goirand
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Fix Released
Undecided
Thomas Goirand

Bug Description

When there is no help for a configuration object, config/generator.py crashes with the below stack dump:

WARNING: "auth_admin_prefix" is missing help string.
Traceback (most recent call last):
  File "./tools/conf/../../ceilometer/openstack/common/config/generator.py", line 255, in <module>
    main()
  File "./tools/conf/../../ceilometer/openstack/common/config/generator.py", line 252, in main
    generate(sys.argv[1:])
  File "./tools/conf/../../ceilometer/openstack/common/config/generator.py", line 98, in generate
    print_group_opts(group, opts)
  File "./tools/conf/../../ceilometer/openstack/common/config/generator.py", line 174, in print_group_opts
    _print_opt(opt)
  File "./tools/conf/../../ceilometer/openstack/common/config/generator.py", line 215, in _print_opt
    opt_help += ' (' + OPT_TYPES[opt_type] + ')'
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

I'll be fixing this.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo-incubator (master)

Fix proposed to branch: master
Review: https://review.openstack.org/34414

Changed in oslo:
assignee: nobody → Thomas Goirand (thomas-goirand)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/34414
Committed: http://github.com/openstack/oslo-incubator/commit/631a4950650538c2e009ddae5165dd1f18f6308f
Submitter: Jenkins
Branch: master

commit 631a4950650538c2e009ddae5165dd1f18f6308f
Author: Thomas Goirand <email address hidden>
Date: Tue Jun 25 22:46:48 2013 +0800

    Fixes crash when no help for an option

    When there is no help available for an option, the generator.py
    simply crashes. This fixes this by initialising opt_help.

    Fixes Bug1194524

    Change-Id: I94c23973bdad603703f12e936b7e72fe0e81c3f0

Changed in oslo:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → havana-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: havana-2 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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