From f836e47b7053ce8cd83c66728acfb9b0f821bcac Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Wed, 8 Nov 2017 01:23:28 -0500 Subject: [PATCH] virtinst: Fix _URLFetcher for reading files _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 5dae424c2..1288668a3 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()