From 9347b03add9503a0c059940f14f0defcdc1bbaf5 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 25 Aug 2023 01:22:23 +1200 Subject: [PATCH 1/1] buildmimetree.py: make Multipart nodes hashable --- .config/neomutt/buildmimetree.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/neomutt/buildmimetree.py b/.config/neomutt/buildmimetree.py index 02d668b..97ada97 100755 --- a/.config/neomutt/buildmimetree.py +++ b/.config/neomutt/buildmimetree.py @@ -252,6 +252,9 @@ class Multipart( def __str__(self): return f" children={len(self.children)}" + def __hash__(self): + return hash(str(self.subtype) + "".join(str(self.children))) + def filewriter_fn(path, content, mode="w", **kwargs): with open(path, mode, **kwargs) as out_f: -- 2.39.5