Skip to content

Commit

Permalink
handling None(type) in In-Reply-To field
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenthall committed Apr 18, 2023
1 parent c5efdd7 commit 7ee437e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bigbang/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def get_threads(self, verbose=False):
if c % 1000 == 0:
logging.info("Processed %d of %d" % (c, total))

if i[1]["In-Reply-To"] == "None":
if i[1]["In-Reply-To"] == "None" or i[1]["In-Reply-To"] is None:
root = Node(i[0], i[1])
visited[i[0]] = root
threads.append(Thread(root))
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_bigbang.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def test_mailman_chain(self):
[t.get_num_messages() for t in arx.get_threads()] == [3, 1, 2],
msg="Thread message count in mbox archive is off",
)

self.assertTrue(
[t.get_num_messages() for t in arx2.get_threads()] == [3, 1, 2],
msg="Thread message count in restored archive is off",
Expand Down

0 comments on commit 7ee437e

Please sign in to comment.