ACBase.py 文件源码

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

项目:AnalyticContainer 作者: DataKitchen 项目源码 文件源码
def parse_command_line(self, parser):
        try:
            if parser is not None:
                mutually_exclusive_group = parser.add_mutually_exclusive_group()
                mutually_exclusive_group.add_argument('--rude', '-rude', action='store_true', default=False, dest='rude',
                                                      help='Return something rude')
                results = parser.parse_args()
                if results.rude is True:
                    ACLogger.log_and_print("ACBase ... print rude words")
        except argparse.ArgumentError as e:
            s = 'ACBase:  During processing, caught an unknown exception. type: %s ; args: %s ; message: %s' % (
            type(e), repr(e.args), e.message)
            ACLogger.log_and_print_error(s)
            self.set_container_status(CONTAINER_STATUS_ERROR)
            return False
        except Exception as e:
            s = 'ACBase:  During processing, caught an unknown exception:  %s %s' % (type(e), e.args)
            ACLogger.log_and_print_error(s)
            self.set_container_status(CONTAINER_STATUS_ERROR)
            return False

        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号