From e999e5e2f8ca3ef0d1d38df05022831b705bb785 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Wed, 5 Oct 2022 16:59:19 +0200 Subject: [PATCH] Band-aid fix for newer python in imported module --- hamnadmin/vendor/feedparser/feedparser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hamnadmin/vendor/feedparser/feedparser.py b/hamnadmin/vendor/feedparser/feedparser.py index 07ed0c8..f121ed5 100644 --- a/hamnadmin/vendor/feedparser/feedparser.py +++ b/hamnadmin/vendor/feedparser/feedparser.py @@ -90,7 +90,9 @@ except ImportError: base64 = binascii = None else: # Python 3.1 deprecates decodestring in favor of decodebytes - _base64decode = getattr(base64, 'decodebytes', base64.decodestring) + #_base64decode = getattr(base64, 'decodebytes', base64.decodestring) + # XXX: python 3.8 *removes* decodestrig, breaking the above, so fix it properly + _base64decode = getattr(base64, 'decodebytes') if hasattr(base64, 'decodebytes') else getattr(base64, 'decodestring') # _s2bytes: convert a UTF-8 str to bytes if the interpreter is Python 3 # _l2bytes: convert a list of ints to bytes if the interpreter is Python 3 -- 2.39.5