set_override method can't hande parameter override=None when enforce_type=True

Bug #1515230 reported by ChangBo Guo(gcb)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.config
Fix Released
Low
ChangBo Guo(gcb)

Bug Description

Method set_override will check parameter override's type when
enforce_type=True, If parameter override is None, it doesn't
work for some types like IntOpt, or doesn't work properly for StrOpt.
For IntOpt, it raises TypeError, and for StrOpt, it converts None to
string 'None', that's not we expect.

so need skip the parameter override=None for all types.

Changed in oslo.config:
assignee: nobody → ChangBo Guo(gcb) (glongwave)
status: New → In Progress
Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :
Changed in oslo.config:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.config (master)

Reviewed: https://review.openstack.org/243001
Committed: https://git.openstack.org/cgit/openstack/oslo.config/commit/?id=95ba1c4795d013e6ace0c0407a2be03b43d09012
Submitter: Jenkins
Branch: master

commit 95ba1c4795d013e6ace0c0407a2be03b43d09012
Author: ChangBo Guo(gcb) <email address hidden>
Date: Mon Nov 9 17:02:43 2015 +0800

    Allow method set_override with parameter override=None for all types

    Method set_override will check parameter override's type when
    enforce_type=True, If parameter override with value None, it doesn't
    work for some types like IntOpt, or doesn't work properly for StrOpt.
    For IntOpt, it raise TypeError, and For StrOpt, it convert None to
    string 'None', that's not we expect.

    Closes-Bug: #1515230
    Change-Id: I42ceeccf59111057b5a92c849c9bb5f83255b324

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.

Other bug subscribers

Remote bug watches

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