Skip to content

Commit

Permalink
Merge branch 'transition_exec' into outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelduchesne committed Aug 30, 2021
2 parents 6a726eb + 0b1e6fb commit 800f25e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions archetypal/eplus_interface/transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ def run(self):

generator = TransitionExe(self.idf, tmp_dir=tmp)

# set the initial version from which we are transitioning
last_successful_transition = self.idf.file_version

for trans in tqdm(
generator,
total=len(generator.transitions),
Expand Down Expand Up @@ -214,10 +217,14 @@ def run(self):
time.time() - start_time
)
)
last_successful_transition = trans.trans
self.success_callback()
for line in self.p.stderr:
self.msg_callback(line.decode("utf-8"))
else:
# set the version of the IDF the latest it was able to transition
# to.
self.idf.as_version = last_successful_transition
self.msg_callback("Transition failed")
self.failure_callback()

Expand Down

0 comments on commit 800f25e

Please sign in to comment.