yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #22677
[Bug 1367172] Re: glance-manage db_load_metadefs should use 'with open as...'
** Changed in: glance
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1367172
Title:
glance-manage db_load_metadefs should use 'with open as...'
Status in OpenStack Image Registry and Delivery Service (Glance):
Fix Released
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1367172/+subscriptions
References