From 851098afad83672ea9d870962c82e65ded95d975 Mon Sep 17 00:00:00 2001 From: Julius <juliusflorstedt@gmail.com> Date: Mon, 17 Mar 2025 10:58:35 +0100 Subject: [PATCH] revert --- plot_serializer/serializer.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plot_serializer/serializer.py b/plot_serializer/serializer.py index 6955dee..023e96b 100644 --- a/plot_serializer/serializer.py +++ b/plot_serializer/serializer.py @@ -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: -- GitLab