From aa99764a9696ade7936f832fddf8be5373711027 Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Tue, 15 Oct 2024 16:58:20 -0400 Subject: [PATCH] Bugfix: error if used in a loop and previous directories deleted. * The code crashed if called with a loop in the flowchart, and the last directory of a previous loop iteration was deleted before running the next iteration. --- HISTORY.rst | 4 ++++ psi4_step/psi4.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 473b8c6..9ddf4f2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,10 @@ ======= History ======= +2024.10.15 -- Bugfix: error if used in a loop and previous directories deleted. + * The code crashed if called with a loop in the flowchart, and the last directory of + a previous loop iteration was deleted before running the next iteration. + 2024.10.5 -- Enhancements and bug fixes for thermochemistry * Improved GUI for thermochemistry so that it automatically recognizes whether it is after e.g. an optimization and configures appropriately. diff --git a/psi4_step/psi4.py b/psi4_step/psi4.py index 9ee352e..d696cd9 100644 --- a/psi4_step/psi4.py +++ b/psi4_step/psi4.py @@ -268,6 +268,8 @@ def run(self): The next node object in the flowchart. """ + next_node = super().run(printer) + printer.important(self.header) printer.important("") @@ -346,8 +348,6 @@ def run(self): # Work through the subflowchart to find out what to do. self.subflowchart.root_directory = self.flowchart.root_directory - next_node = super().run(printer) - # Get the first real node node0 = self.subflowchart.get_node("1").next()