aboutsummaryrefslogtreecommitdiffstats
path: root/cloud_mdir_sync/office365.py
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@mellanox.com>2020-06-19 11:10:46 -0300
committerJason Gunthorpe <jgg@nvidia.com>2020-06-22 20:24:18 -0300
commitdc8cf1fb338b6f072692c34a4e22a24551486b35 (patch)
tree83903557ad2e2d300e143c7762260f7f40dd0218 /cloud_mdir_sync/office365.py
parentdfa6df1f50f9bb89ad27542712bfebdad9317b37 (diff)
downloadcloud_mdir_sync-dc8cf1fb338b6f072692c34a4e22a24551486b35.tar.gz
cloud_mdir_sync-dc8cf1fb338b6f072692c34a4e22a24551486b35.tar.bz2
cloud_mdir_sync-dc8cf1fb338b6f072692c34a4e22a24551486b35.zip
Add debugging to try to find an assertion
File "/home/jgg/oss/sync/cloud_mdir_sync/maildir.py", line 210, in force_content self._store_msg(msgs[content_hash]) File "/home/jgg/oss/sync/cloud_mdir_sync/maildir.py", line 145, in _store_msg self.msgdb.write_content(cloudmsg.content_hash, msg.fn) File "/home/jgg/oss/sync/cloud_mdir_sync/messages.py", line 279, in write_content assert content_hash in self.file_hashes Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'cloud_mdir_sync/office365.py')
-rw-r--r--cloud_mdir_sync/office365.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cloud_mdir_sync/office365.py b/cloud_mdir_sync/office365.py
index 030254b..f66882f 100644
--- a/cloud_mdir_sync/office365.py
+++ b/cloud_mdir_sync/office365.py
@@ -488,6 +488,9 @@ class O365Mailbox(mailbox.Mailbox):
self.graph = graph
self.max_fetches = asyncio.Semaphore(10)
+ def __repr__(self):
+ return f"<O365Mailbox at {id(self):x} for {self.graph.domain_id} {self.mailbox}>"
+
async def setup_mbox(self):
"""Setup access to the authenticated API domain for this endpoint"""
cfg = self.cfg
@@ -603,7 +606,9 @@ class O365Mailbox(mailbox.Mailbox):
for msg in msgs:
# Something went wrong?
if msg.content_hash is not None:
+ assert msg.content_hash in self.msgdb.file_hashes
res[msg.content_hash] = msg
+
self.messages = res
self.need_update = False
if not self.use_owa_subscribe: