if __name__ == "__main__":
command_executors = {
'validate': command_validate,
'test': command_test,
'help': command_help
}
command = command_executors.get(sys.argv[1])
try:
command()
sys.exit(0)
except Exception as e:
logger.error('error=%s\nTraceback:%s' % (str(e), traceback.format_exc()))
sys.exit(1)