cards.py 文件源码

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

项目:mongoaudit 作者: stampery 项目源码 文件源码
def email_prompt(self, result, title, urn):
        header = urwid.Text(('text bold', 'Send detailed results report via email'))
        subtitle = urwid.Text([
            ('text', 'The email report contains detailed results of each of the runned tests, '
                     'as well as links to guides on how to fix the found issues.\n\n'),
            ('text italic', 'You will be included into a MongoDB critical security bugs '
                            'newsletter. We will never SPAM you, we promise!')
        ])
        content = urwid.Pile([header, DIV, subtitle])
        card = FormCard(
            {"content": content, "app": self.app},
            ['Email'],
            'Send report',
            {
                'next': lambda form, email: self.send_email(email.strip(), result, title, urn) \
                if validate_email(email) else form.set_message("Invalid email address", True),
                'back': lambda _: self.display_overview(result, title, urn)
            })


        self.app.render(card)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号