void-packages/srcpkgs/zim/patches/02-py39.patch

23 lines
769 B
Diff

From 177d4b58f5bc5b298bc88907d76372334057dd31 Mon Sep 17 00:00:00 2001
From: Alexander Kapshuna <kapsh@kap.sh>
Date: Tue, 22 Sep 2020 21:26:39 +0300
Subject: [PATCH] Fix reading preformatted text under Python 3.9 (#1261)
---
zim/formats/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git zim/formats/__init__.py zim/formats/__init__.py
index e1149f7f..f22b0b0b 100644
--- zim/formats/__init__.py
+++ zim/formats/__init__.py
@@ -822,7 +822,7 @@ def end(self, tag):
self._last_char = None
def append(self, tag, attrib=None, text=None):
- attrib = attrib.copy() if attrib is not None else None
+ attrib = attrib.copy() if attrib is not None else {}
if tag in BLOCK_LEVEL:
if text and not text.endswith('\n'):
text += '\n'