pixelizer.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:bitmask-dev 作者: leapcode 项目源码 文件源码
def _get_or_create_mailbox(self, mailbox_name):
            """
            Avoid creating variations of the case.
            If there's already a 'Sent' folder, do not create 'SENT', just
            return that.
            """
            name = yield self._get_case_insensitive_mbox(mailbox_name)
            if name is None:
                name = mailbox_name
                yield self.account.add_mailbox(name)
            mailbox = yield self.account.get_collection_by_mailbox(
                name)

            # Pixelated expects the mailbox wrapper;
            # it should limit itself to the Mail API instead.
            # This is also a smell that the collection-mailbox-wrapper
            # distinction is not clearly cut.
            defer.returnValue(mailbox.mbox_wrapper)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号