Skip to content
Snippets Groups Projects
Commit 851098af authored by Julius's avatar Julius
Browse files

revert

parent 850bfaf4
No related branches found
No related tags found
1 merge request!44Resolve "Add doc for when to call via serializer, when to call plt"
......@@ -418,9 +418,7 @@ class Serializer:
if self._written_to_file:
raise NotImplementedError("You can only write the figure into the JSON once! Multiple tries were attempted")
if isinstance(file, str):
directory = os.path.dirname(file)
if directory:
os.makedirs(directory, exist_ok=True)
os.makedirs(os.path.dirname(file), exist_ok=True)
with open(file, "w") as file:
self.write_json_file(file)
else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment