os-apply-config fails with TypeError: string indices must be integers when traversing strings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-apply-config |
Fix Released
|
Medium
|
Coleman Corrigan |
Bug Description
os-apply-config fails with a TypeError when searching for a non existent key if parent component of the key is a string
e.g:
/os_apply_config# os-apply-config --key db-password.s --type raw --key-default ''
Traceback (most recent call last):
File "/usr/local/
sys.
File "/opt/stack/
opts.
File "/opt/stack/
config = config[key]
TypeError: string indices must be integers
but
# os-apply-config --key non.existent.
/os_apply_config#
inconsistent behaviour - IMHO both cases should return the key-default
Changed in os-apply-config: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in os-apply-config: | |
assignee: | nobody → Coleman Corrigan (coleman-corrigan) |
status: | Triaged → In Progress |
Changed in os-apply-config: | |
status: | Fix Committed → Fix Released |
Reviewed: https:/ /review. openstack. org/94810 /git.openstack. org/cgit/ openstack/ os-apply- config/ commit/ ?id=e3aa1631c11 cc6fd815cf26cb4 e23ca4010309ff
Committed: https:/
Submitter: Jenkins
Branch: master
commit e3aa1631c11cc6f d815cf26cb4e23c a4010309ff
Author: Coleman Corrigan <email address hidden>
Date: Thu May 22 10:56:52 2014 +0100
Fix for string key traversal bug #1321827
Gracefully handle the traversal of strings in a key search path.
Closes-Bug: #1321827
Change-Id: I1fab13905fc1f6 ed2817081d58fcc 5379f2a8515