Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP2:Update
virt-manager
53245827-urlfetcher-Force-a-flush-after-writing...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 53245827-urlfetcher-Force-a-flush-after-writing-to-a-file.patch of Package virt-manager
Subject: urlfetcher: Force a flush after writing to a file From: Fabiano FidĂȘncio fidencio@redhat.com Mon Aug 5 13:47:25 2019 +0200 Date: Tue Aug 6 17:59:05 2019 -0400: Git: 5324582747a57c5df1574ed99dbe20d3d0f65747 While downloading really small files, on some file systems, the files may not be flushed on time for whatever reason they've been downloaded. This issue was noticed after trying to perform unattended installations and noticing that some files, particularly really small ones, where just empty. While the original issue would be fixed by doing the flush on _HTTPURLFetcher::_write(), let's also force it on _URLFetcher::_write() to do the same. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com> diff --git a/virtinst/install/urlfetcher.py b/virtinst/install/urlfetcher.py index e48c801c..07f8b5ea 100644 --- a/virtinst/install/urlfetcher.py +++ b/virtinst/install/urlfetcher.py @@ -156,6 +156,7 @@ class _URLFetcher(object): fileobj.write(buff) total += len(buff) self.meter.update(total) + fileobj.flush() return total def _grabber(self, url): @@ -291,6 +292,7 @@ class _HTTPURLFetcher(_URLFetcher): fileobj.write(data) total += len(data) self.meter.update(total) + fileobj.flush() return total
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor