python类SystemExit()的实例源码

application.py 文件源码 项目:bokken 作者: thestr4ng3r 项目源码 文件源码 阅读 29 收藏 0 点赞 0 评论 0
def handle_with_processors(self):
        def process(processors):
            try:
                if processors:
                    p, processors = processors[0], processors[1:]
                    return p(lambda: process(processors))
                else:
                    return self.handle()
            except web.HTTPError:
                raise
            except (KeyboardInterrupt, SystemExit):
                raise
            except:
                print >> web.debug, traceback.format_exc()
                raise self.internalerror()

        # processors must be applied in the resvere order. (??)
        return process(self.processors)
application.py 文件源码 项目:py-script 作者: xiaoxiamin 项目源码 文件源码 阅读 24 收藏 0 点赞 0 评论 0
def handle_with_processors(self):
        def process(processors):
            try:
                if processors:
                    p, processors = processors[0], processors[1:]
                    return p(lambda: process(processors))
                else:
                    return self.handle()
            except web.HTTPError:
                raise
            except (KeyboardInterrupt, SystemExit):
                raise
            except:
                print >> web.debug, traceback.format_exc()
                raise self.internalerror()

        # processors must be applied in the resvere order. (??)
        return process(self.processors)
application.py 文件源码 项目:py-script 作者: xiaoxiamin 项目源码 文件源码 阅读 22 收藏 0 点赞 0 评论 0
def handle_with_processors(self):
        def process(processors):
            try:
                if processors:
                    p, processors = processors[0], processors[1:]
                    return p(lambda: process(processors))
                else:
                    return self.handle()
            except web.HTTPError:
                raise
            except (KeyboardInterrupt, SystemExit):
                raise
            except:
                print >> web.debug, traceback.format_exc()
                raise self.internalerror()

        # processors must be applied in the resvere order. (??)
        return process(self.processors)
application.py 文件源码 项目:cosa-nostra 作者: joxeankoret 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def handle_with_processors(self):
        def process(processors):
            try:
                if processors:
                    p, processors = processors[0], processors[1:]
                    return p(lambda: process(processors))
                else:
                    return self.handle()
            except web.HTTPError:
                raise
            except (KeyboardInterrupt, SystemExit):
                raise
            except:
                print >> web.debug, traceback.format_exc()
                raise self.internalerror()

        # processors must be applied in the resvere order. (??)
        return process(self.processors)
test_oonicli.py 文件源码 项目:ooniprobe-debian 作者: TheTorProject 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def test_create_deck_not_found(self):
        global_options = {
            'no-yamloo': True,
            'subargs': [],
            'annotations': {},
            'collector': None,
            'bouncer': None,
            'no-collector': False,
            'test_file': 'invalid/path',
            'testdeck': None
        }
        exc = None
        try:
            createDeck(global_options)
        except exceptions.SystemExit as exc:
            exc = exc
        self.assertIsNotNone(exc)
        self.assertEqual(exc.code, 3)


问题


面经


文章

微信
公众号

扫码关注公众号