14
0

Accepting request 941855 from home:PSuarezHernandez:branches:devel:languages:python

- Use binary mode when reopening files
- Added:
  * use-binary-mode-when-reopening-files.patch

OBS-URL: https://build.opensuse.org/request/show/941855
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urlgrabber?expand=0&rev=44
This commit is contained in:
2021-12-21 17:57:00 +00:00
committed by Git OBS Bridge
parent 8f78dfe2c8
commit aee0892c25
3 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
Index: urlgrabber-4.1.0/urlgrabber/grabber.py
===================================================================
--- urlgrabber-4.1.0.orig/urlgrabber/grabber.py
+++ urlgrabber-4.1.0/urlgrabber/grabber.py
@@ -1857,7 +1857,7 @@ class PyCurlFileObject(object):
raise err
# re open it
try:
- self.fo = open(self.filename, 'r')
+ self.fo = open(self.filename, 'rb')
except IOError as e:
err = URLGrabError(16, _('error opening file from %s, IOError: %s')
% (self.url, e))