glance-manage db_load_metadefs should use 'with open as...'
Bug #1367172 reported by
Pawel Koniszewski
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Low
|
Pawel Koniszewski |
Bug Description
Currently script which loads metadeta definitions to database uses try except block with open(file) inside. There is better solution in Python for file streams - use 'with open(file) as...'. With this approach we will be sure that every resource is cleaned up when the code finishes running.
Changed in glance: | |
status: | New → In Progress |
assignee: | nobody → Pawel Koniszewski (pawel-koniszewski) |
tags: | added: metadef |
Changed in glance: | |
milestone: | none → juno-rc1 |
Changed in glance: | |
importance: | Undecided → Low |
Changed in glance: | |
status: | Fix Committed → Fix Released |
Changed in glance: | |
milestone: | juno-rc1 → 2014.2 |
To post a comment you must log in.
Review: https:/ /review. openstack. org/#/c/ 120041/
No idea why it wasn't linked.