File e902fa55-force-binary-mode-with-FTP-servers.patch of Package virt-manager.9970
Subject: urlfetcher: force binary mode with FTP servers (bz #1462838)
From: Cole Robinson crobinso@redhat.com Thu Aug 17 16:10:46 2017 -0400
Date: Thu Aug 17 16:10:46 2017 -0400:
Git: e902fa5550cc09538429b0fa828fb31aa2706d01
Index: virt-manager-1.4.0/virtinst/urlfetcher.py
===================================================================
--- virt-manager-1.4.0.orig/virtinst/urlfetcher.py
+++ virt-manager-1.4.0/virtinst/urlfetcher.py
@@ -224,6 +224,8 @@ class _FTPURLFetcher(_URLFetcher):
self._ftp = ftplib.FTP()
self._ftp.connect(parsed.hostname, parsed.port)
self._ftp.login()
+ # Force binary mode
+ self._ftp.voidcmd("TYPE I")
except Exception, e:
raise ValueError(_("Opening URL %s failed: %s.") %
(self.location, str(e)))