Merge "Forced flush of tmp file to disk on ui retrieval" into stable/mitaka

This commit is contained in:
Jenkins 2016-05-26 08:38:08 +00:00 committed by Gerrit Code Review
commit 492d716b7a
1 changed files with 2 additions and 0 deletions

View File

@ -281,6 +281,8 @@ class Controller(object):
with tempfile.NamedTemporaryFile() as tempf:
for chunk in blob_data:
tempf.write(chunk)
tempf.flush()
os.fsync(tempf.file.fileno())
with load_utils.load_from_file(tempf.name, target_dir=None,
drop_dir=True) as pkg:
return pkg.ui