Skip to content

Commit

Permalink
Make sure configuration is restored if there is an error calculating …
Browse files Browse the repository at this point in the history
…concentrations
  • Loading branch information
vasole committed Oct 5, 2023
1 parent 54208e5 commit 5fd077f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PyMca5/PyMcaPhysics/xrf/McaAdvancedFitBatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5fd077f

Please sign in to comment.