当前位置: 首页>>代码示例>>Python>>正文


Python Commands.checkmd5s方法代码示例

本文整理汇总了Python中commands.Commands.checkmd5s方法的典型用法代码示例。如果您正苦于以下问题:Python Commands.checkmd5s方法的具体用法?Python Commands.checkmd5s怎么用?Python Commands.checkmd5s使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在commands.Commands的用法示例。


在下文中一共展示了Commands.checkmd5s方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: updatemd5

# 需要导入模块: from commands import Commands [as 别名]
# 或者: from commands.Commands import checkmd5s [as 别名]
def updatemd5(conffile, force):
    try:
        commands = Commands(conffile)

        if (commands.checkmd5s(CLIENT) or commands.checkmd5s(SERVER)) and not force:
            print 'WARNING:'
            print 'The updatemd5 script is unsupported and should only be run in special'
            print 'cases, such as if there were compile errors in the last decompile which'
            print 'have now been corrected. It will reset the changed status of all classes'
            print 'for reobfuscation, and only classes modified afterwards will end up in'
            print 'the reobf directory.'
            print 'Only use this script if you absolutely know what you are doing, or when a'
            print 'MCP team member asks you to do so.'
            answer = raw_input('If you really want to update all classes, enter "Yes" ')
            if answer.lower() not in ['yes']:
                print 'You have not entered "Yes", aborting the update process'
                sys.exit(1)

        try:
            updatemd5_side(commands, CLIENT)
        except CalledProcessError:
            commands.logger.error('Client recompile failed, correct source then rerun updatemd5')
        try:
            updatemd5_side(commands, SERVER)
        except CalledProcessError:
            commands.logger.error('Server recompile failed, correct source then rerun updatemd5')
    except Exception:  # pylint: disable-msg=W0703
        logging.exception('FATAL ERROR')
        sys.exit(1)
开发者ID:CatRabbit499,项目名称:MCTC,代码行数:31,代码来源:updatemd5.py


注:本文中的commands.Commands.checkmd5s方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。