From 92ed55c5a0d254a7b3f2d3a7c7147d3668ba2cf5 Mon Sep 17 00:00:00 2001 From: qzhu2017 Date: Sun, 19 May 2024 18:15:43 -0400 Subject: [PATCH] add error output in gulp --- pyxtal/interface/gulp.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyxtal/interface/gulp.py b/pyxtal/interface/gulp.py index abb8b982..5a9c0935 100644 --- a/pyxtal/interface/gulp.py +++ b/pyxtal/interface/gulp.py @@ -87,8 +87,12 @@ def execute(self): os.system(cmd) def clean(self): - os.remove(self.input) - os.remove(self.output) + if self.error: + os.system('mv ' + self.input + ' error_' + self.input) + os.system('mv ' + self.output + ' error_' + self.output) + else: + os.remove(self.input) + os.remove(self.output) if self.dump is not None: os.remove(self.dump)