diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-02-05 11:37:54 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-02-07 11:25:26 -0400 |
commit | bf72ac2c33516a951b7b156c10c4e753c781bfc2 (patch) | |
tree | 81e73d76e882546d8a4c6bc122b34bbbe492eebf /cloud_mdir_sync/office365.py | |
parent | fc7ff9fe8288b07442ae9c9a501190d935c1a5d7 (diff) | |
download | cloud_mdir_sync-bf72ac2c33516a951b7b156c10c4e753c781bfc2.tar.gz cloud_mdir_sync-bf72ac2c33516a951b7b156c10c4e753c781bfc2.tar.bz2 cloud_mdir_sync-bf72ac2c33516a951b7b156c10c4e753c781bfc2.zip |
Lift Mailbox.cfg out of the sub classes
Make sure it is always set
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'cloud_mdir_sync/office365.py')
-rw-r--r-- | cloud_mdir_sync/office365.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cloud_mdir_sync/office365.py b/cloud_mdir_sync/office365.py index a13c7bb..7b6e7c8 100644 --- a/cloud_mdir_sync/office365.py +++ b/cloud_mdir_sync/office365.py @@ -362,21 +362,21 @@ class O365Mailbox(mailbox.Mailbox): loop: asyncio.AbstractEventLoop timer = None use_owa_subscribe = True - cfg: config.Config graph: GraphAPI def __init__(self, + cfg: config.Config, mailbox: str, user: Optional[str] = None, tenant="common"): - super().__init__() + super().__init__(cfg) self.mailbox = mailbox self.tenant = tenant self.user = user - async def setup_mbox(self, cfg: config.Config): + async def setup_mbox(self): """Setup access to the authenticated API domain for this endpoint""" - self.cfg = cfg + cfg = self.cfg self.loop = cfg.loop did = f"o365-{self.user}-{self.tenant}" graph = cfg.domains.get(did) |