forked from pool/python-urlgrabber
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:
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 21 14:02:50 UTC 2021 - Pablo Suárez Hernández <pablo.suarezhernandez@suse.com>
|
||||||
|
|
||||||
|
- Use binary mode when reopening files
|
||||||
|
|
||||||
|
- Added:
|
||||||
|
* use-binary-mode-when-reopening-files.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 8 12:49:46 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
Fri Oct 8 12:49:46 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@@ -26,6 +26,9 @@ License: LGPL-2.1-only
|
|||||||
Group: Development/Libraries/Python
|
Group: Development/Libraries/Python
|
||||||
URL: https://github.com/rpm-software-management/urlgrabber
|
URL: https://github.com/rpm-software-management/urlgrabber
|
||||||
Source: https://github.com/rpm-software-management/%{modname}/releases/download/%{modname}-4-1-0/%{modname}-%{version}.tar.gz
|
Source: https://github.com/rpm-software-management/%{modname}/releases/download/%{modname}-4-1-0/%{modname}-%{version}.tar.gz
|
||||||
|
# PATCH-FIX_UPSTREAM https://github.com/rpm-software-management/urlgrabber/pull/32
|
||||||
|
Patch0: use-binary-mode-when-reopening-files.patch
|
||||||
|
|
||||||
BuildRequires: %{python_module pycurl}
|
BuildRequires: %{python_module pycurl}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
@@ -47,6 +50,7 @@ throttling, authentication, proxies and more.
|
|||||||
%setup -q -n urlgrabber-%{version}
|
%setup -q -n urlgrabber-%{version}
|
||||||
# Remove with next release
|
# Remove with next release
|
||||||
sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes bnc#781323
|
sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes bnc#781323
|
||||||
|
%autopatch -p1
|
||||||
|
|
||||||
# Fix location of %%{_libexecdir}
|
# Fix location of %%{_libexecdir}
|
||||||
sed -i 's!/usr/libexec!%{_libexecdir}!' urlgrabber/grabber.py
|
sed -i 's!/usr/libexec!%{_libexecdir}!' urlgrabber/grabber.py
|
||||||
|
13
use-binary-mode-when-reopening-files.patch
Normal file
13
use-binary-mode-when-reopening-files.patch
Normal 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))
|
Reference in New Issue
Block a user