jsonutils.to_primitive raises exception when it comes to file object

Bug #1028897 reported by yong sheng gong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo-incubator
Invalid
Undecided
Unassigned

Bug Description

.to_primitive():
       elif hasattr(value, '__iter__'):
            return to_primitive(list(value),
                                convert_instances=convert_instances,
                                level=level)

list(value) will raise exception when the value is a file object.

Revision history for this message
Russell Bryant (russellb) wrote :

Do you have an example of when this occurs and causes a problem in openstack code?

Mark McLoughlin (markmc)
Changed in openstack-common:
status: New → Incomplete
Mark McLoughlin (markmc)
affects: openstack-common → oslo
Mark McLoughlin (markmc)
Changed in oslo:
status: Incomplete → Invalid
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.