def update_metadata(session, path=DATA_PATH):
with open(os.path.join(path, '<STR_LIT>')) as handle:<EOL><INDENT>games = json.loads(handle.read())<EOL><DEDENT>for key, data in get_metadata(session, games).items():<EOL><INDENT>with open(os.path.join(path, '<STR_LIT>'.format(key)), '<STR_LIT:w>') as handle:<EOL><INDENT>handle.write(json.dumps(data, indent=<NUM_LIT:2>))<EOL><DEDENT><DEDENT>
Update metadata files (only ladders right now).