Skip to content

Commit

Permalink
evm_transition_tool: fix t8n dump on str types (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
marioevz authored Aug 17, 2023
1 parent 95cde75 commit 542d85d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/evm_transition_tool/transition_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ def dump_files_to_directory(output_path: str, files: Dict[str, Any]) -> None:
for file_name, file_contents in files.items():
file_path = os.path.join(output_path, file_name)
with open(file_path, "w") as f:
dump(file_contents, f, ensure_ascii=True, indent=4)
if isinstance(file_contents, str):
f.write(file_contents)
else:
dump(file_contents, f, ensure_ascii=True, indent=4)


class TransitionTool:
Expand Down

0 comments on commit 542d85d

Please sign in to comment.