From 5fd077f2404e9ae69470ce03a7c6ef0532dd491d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=2E=20Armando=20Sol=C3=A9?= Date: Thu, 5 Oct 2023 18:33:17 +0200 Subject: [PATCH] Make sure configuration is restored if there is an error calculating concentrations --- PyMca5/PyMcaPhysics/xrf/McaAdvancedFitBatch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PyMca5/PyMcaPhysics/xrf/McaAdvancedFitBatch.py b/PyMca5/PyMcaPhysics/xrf/McaAdvancedFitBatch.py index 8258496d4..bd0759164 100644 --- a/PyMca5/PyMcaPhysics/xrf/McaAdvancedFitBatch.py +++ b/PyMca5/PyMcaPhysics/xrf/McaAdvancedFitBatch.py @@ -2,7 +2,7 @@ # # The PyMca X-Ray Fluorescence Toolkit # -# Copyright (c) 2004-2022 European Synchrotron Radiation Facility +# Copyright (c) 2004-2023 European Synchrotron Radiation Facility # # This file is part of the PyMca X-ray Fluorescence Toolkit developed at # the ESRF. @@ -802,6 +802,8 @@ def _fitMca(self, filename): concentrations = None _logger.error("error in concentrations") _logger.error(str(sys.exc_info()[0:-1])) + self._restoreFitConfig(filename, + 'calculating concentrations') else: #just images fitresult = self.mcafit.startfit(digest=0)