href = b.href
transl_d = self.transl_d
- if transl_d.has_key(href):
+ if href in transl_d:
b.href = transl_d[href]
root_folder.walk_depth(Transl(transl_d))
- outfile = open(output_filename, 'w')
+ outfile = open(output_filename, 'wt', encoding='utf-8')
root_folder.walk_depth(writer(outfile, prune))
outfile.close()