fold headers checks for dict by keys but what it really cares about is items

Bug #1756157 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
microversion-parse
Fix Released
Undecided
Chris Dent

Bug Description

The fold_headers method tries to ensure it has a dict by checking for a keys attribute but then goes on to use items.

This makes no sense and could be a lot tidier. See: https://review.openstack.org/#/c/495356/5/microversion_parse/__init__.py@94

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

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

Changed in microversion-parse:
assignee: nobody → Chris Dent (cdent)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to microversion-parse (master)

Reviewed: https://review.openstack.org/554547
Committed: https://git.openstack.org/cgit/openstack/microversion-parse/commit/?id=e93d35f10d3c9ad20774a4be73fd80ecaf97d404
Submitter: Zuul
Branch: master

commit e93d35f10d3c9ad20774a4be73fd80ecaf97d404
Author: Chris Dent <email address hidden>
Date: Tue Mar 20 13:48:05 2018 +0000

    Do not use redundant attr check for keys in fold_headers

    We only care about items, so use it, and pass if we get an
    AttributeError

    Change-Id: I7a09b63db390431be044ae3fc6aeece565606b40
    Closes-Bug: #1756157

Changed in microversion-parse:
status: In Progress → 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.