diff --git a/avoid_crashing_when_urlgrabber_debug_enabled.patch b/avoid_crashing_when_urlgrabber_debug_enabled.patch new file mode 100644 index 0000000..11416fa --- /dev/null +++ b/avoid_crashing_when_urlgrabber_debug_enabled.patch @@ -0,0 +1,24 @@ +From 4c2c0c12e77803a85cbc7d69eaff04b29aab2934 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pablo=20Su=C3=A1rez=20Hern=C3=A1ndez?= + +Date: Thu, 17 Mar 2022 11:50:39 +0000 +Subject: [PATCH] Convert dict_keys to list to not crash when delegate is + enabled + +--- + urlgrabber/grabber.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: urlgrabber-4.1.0/urlgrabber/grabber.py +=================================================================== +--- urlgrabber-4.1.0.orig/urlgrabber/grabber.py ++++ urlgrabber-4.1.0/urlgrabber/grabber.py +@@ -1091,7 +1091,7 @@ class URLGrabberOptions: + return self.format() + + def format(self, indent=' '): +- keys = self.__dict__.keys() ++ keys = list(self.__dict__.keys()) + if self.delegate is not None: + keys.remove('delegate') + keys.sort() diff --git a/python-urlgrabber.changes b/python-urlgrabber.changes index f0eeacb..d95a14b 100644 --- a/python-urlgrabber.changes +++ b/python-urlgrabber.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 3 14:30:01 UTC 2022 - Pablo Suárez Hernández + +- Avoid crashing when setting URLGRABBER_DEBUG=1 environment variable + +- Added: + * avoid_crashing_when_urlgrabber_debug_enabled.patch + ------------------------------------------------------------------- Thu Jun 16 15:20:56 UTC 2022 - Pablo Suárez Hernández diff --git a/python-urlgrabber.spec b/python-urlgrabber.spec index fdd97a8..9a65884 100644 --- a/python-urlgrabber.spec +++ b/python-urlgrabber.spec @@ -30,6 +30,8 @@ Source: https://github.com/rpm-software-management/%{modname}/releases/d Patch0: use-binary-mode-when-reopening-files.patch # PATCH-FIX_UPSTREAM https://github.com/rpm-software-management/urlgrabber/pull/35 Patch1: fix_find_proxy_logic_and_drop_six.patch +# PATCH-FIX_UPSTREAM https://github.com/rpm-software-management/urlgrabber/pull/34 +Patch2: avoid_crashing_when_urlgrabber_debug_enabled.patch BuildRequires: %{python_module pycurl} BuildRequires: %{python_module setuptools}