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

Bug #1756157 reported by Chris Dent on 2018-03-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
microversion-parse
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

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

Changed in microversion-parse:
assignee: nobody → Chris Dent (cdent)
status: New → In Progress

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  Edit
Everyone can see this information.

Other bug subscribers