From 36b999025f767b33be493a29e7636036b17b5dca Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 25 Aug 2023 01:22:23 +1200 Subject: [PATCH] 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