From a76aff7ef10883d95fb74ee9d54caf674d465e83 Mon Sep 17 00:00:00 2001 From: Valentin Sulzer Date: Sat, 14 Sep 2024 22:30:13 -0700 Subject: [PATCH] reordering --- src/pybamm/config.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pybamm/config.py b/src/pybamm/config.py index b670f43257..3696c34cf2 100644 --- a/src/pybamm/config.py +++ b/src/pybamm/config.py @@ -46,15 +46,15 @@ def generate(): if is_running_tests(): return + # Check if the config file already exists + if read() is not None: + return + config_file = _get_config_file() # Create the directory if it doesn't exist config_file.parent.mkdir(parents=True, exist_ok=True) - # Check if the config file already exists - if read() is not None: - return - # Generate a UUID unique_id = uuid.uuid4()