[virt-tools-list] [PATCH 1/2] virtinst: Fix _URLFetcher for reading files

Andrew Wong andrew.kw.w at gmail.com
Wed Nov 8 06:23:28 UTC 2017


_grabber() is used for both binary and text files.
---
 virtinst/urlfetcher.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virtinst/urlfetcher.py b/virtinst/urlfetcher.py
index 5dae424c..1288668a 100644
--- a/virtinst/urlfetcher.py
+++ b/virtinst/urlfetcher.py
@@ -169,7 +169,7 @@ class _URLFetcher(object):
         """
         Grab the passed filename from self.location and return it as a string
         """
-        fileobj = io.StringIO()
+        fileobj = io.BytesIO()
         self._grabURL(filename, fileobj)
         return fileobj.getvalue()
 
-- 
2.14.1




More information about the virt-tools-list mailing list