yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #20709
[Bug 1367172] [NEW] glance-manage db_load_metadefs should use 'with open as...'
Public bug reported:
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.
** Affects: glance
Importance: Undecided
Status: New
--
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):
New
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
Follow ups
References