current_section=[]elif'='inline:assertcurrent_sectionisnotNone,linename,value=line.split('=',1)name=name.strip()value=value.strip()ifname==FILENAME_KEY:hash_file_path=valuecurrent_section.append(line)else:forhash_nameinHASH_MAP:ifname==hash_name:breakelse:raiseValueError('Unknown key: %r'%(name,))# NOT appending this line, it will be re-generated from# scratcheol=''.join(xforxinlineifxin('\r','\n'))continueifcurrent_sectionisNone:write(line)else:current_section.append(line)outfile.close()shutil.copymode(infile_path,outfile_path)shutil.move(outfile_path,infile_path)exceptException:os.unlink(outfile_path)raiseif__name__=='__main__':main()