def write_shas_to_shastore(sha_dict):
if sys.version_info[<NUM_LIT:0>] < <NUM_LIT:3>:<EOL><INDENT>fn_open = open<EOL><DEDENT>else:<EOL><INDENT>fn_open = io.open<EOL><DEDENT>with fn_open("<STR_LIT>", "<STR_LIT:w>") as fh:<EOL><INDENT>fh.write("<STR_LIT>")<EOL>fh.write('<STR_LIT>'.format(constants.VERSION))<EOL>if sha_dict:<EOL><INDENT>fh.write(yaml.dump(sha_dict))<EOL><DEDENT>fh.write("<STR_LIT>")<EOL><DEDENT>
Writes a sha1 dictionary stored in memory to
the .shastore file