alex@alex:~$ diff MCP5.6/runtime/updatemd5.py MCP6.0/runtime/updatemd5.py
9a10
> import logging
12,13c13,14
< from commands import Commands, CLIENT, SERVER
< from recompile import recompile
---
> from commands import Commands, CLIENT, SERVER, CalledProcessError
> from mcp import updatemd5_side
17c18,19
< parser = OptionParser(version='MCP %s' % Commands.MCPFullVersion())
---
> parser = OptionParser(version='MCP %s' % Commands.fullversion())
> parser.add_option('-f', '--force', action='store_true', dest='force', help='force update', default=False)
20c22
< updatemd5(options.config)
---
> updatemd5(options.config, options.force)
23,25c25
< def updatemd5(conffile=None):
< commands = Commands(conffile)
<
---
> def updatemd5(conffile, force):
27,32c27,52
< commands.logger.info('> Recompiling')
< recompile(conffile)
< commands.logger.info('> Generating the md5 (client)')
< commands.gathermd5s(CLIENT)
< commands.logger.info('> Generating the md5 (server)')
< commands.gathermd5s(SERVER)
---
> 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')
> pass
> try:
> updatemd5_side(commands, SERVER)
> except CalledProcessError:
> commands.logger.error('Server recompile failed, correct source then rerun updatemd5')
> pass
34c54
< commands.logger.exception('FATAL ERROR')
---
> logging.exception('FATAL ERROR')