diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-02-05 12:41:32 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-02-07 11:25:26 -0400 |
commit | f578f75464791e7bfbf6b2544fd8651fe8b6f974 (patch) | |
tree | d46639c402d826874db20e095e30fe77cb1ed055 /cloud_mdir_sync/mailbox.py | |
parent | bf72ac2c33516a951b7b156c10c4e753c781bfc2 (diff) | |
download | cloud_mdir_sync-f578f75464791e7bfbf6b2544fd8651fe8b6f974.tar.gz cloud_mdir_sync-f578f75464791e7bfbf6b2544fd8651fe8b6f974.tar.bz2 cloud_mdir_sync-f578f75464791e7bfbf6b2544fd8651fe8b6f974.zip |
Do not pass msgdb all over the place
The mailboxes can only be linked to a single msgdb, always take it from
the mailbox cfg.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'cloud_mdir_sync/mailbox.py')
-rw-r--r-- | cloud_mdir_sync/mailbox.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cloud_mdir_sync/mailbox.py b/cloud_mdir_sync/mailbox.py index 10b0b64..6f9fea8 100644 --- a/cloud_mdir_sync/mailbox.py +++ b/cloud_mdir_sync/mailbox.py @@ -52,14 +52,17 @@ class Mailbox(object): pass @abstractmethod - def force_content(self, msgdb: "MessageDB", - msgs: "CHMsgDict_Type") -> None: + def force_content(self, msgs: "CHMsgDict_Type") -> None: pass @abstractmethod async def merge_content(self, msgs: "CHMsgMappingDict_Type") -> None: pass + @property + def msgdb(self) -> "MessageDB": + return self.cfg.msgdb + def same_messages(self, mdict: "CHMsgMappingDict_Type", tuple_form=False) -> bool: |