Changeset 5251ec6 in sasview for src/sas/sasgui/perspectives/pr/inversion_panel.py
- Timestamp:
- Oct 11, 2018 12:20:56 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
- Children:
- 98b9f32
- Parents:
- 67ed543
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/pr/inversion_panel.py
rcb62bd5 r5251ec6 5 5 __revision__ = "$Revision: 1193 $" 6 6 7 import wx8 7 import os 9 8 import sys 10 9 import logging 10 11 import wx 11 12 from wx.lib.scrolledpanel import ScrolledPanel 13 12 14 from sas.sasgui.guiframe.events import StatusEvent 13 15 from sas.sasgui.guiframe.panel_base import PanelBase 14 from inversion_state import InversionState15 from pr_widgets import PrTextCtrl16 from pr_widgets import DataFileTextCtrl17 from pr_widgets import OutputTextCtrl18 16 from sas.sasgui.guiframe.documentation_window import DocumentationWindow 17 18 from .inversion_state import InversionState 19 from .pr_widgets import PrTextCtrl 20 from .pr_widgets import DataFileTextCtrl 21 from .pr_widgets import OutputTextCtrl 19 22 20 23 logger = logging.getLogger(__name__) … … 752 755 except ValueError: 753 756 logger.error("InversionControl._on_accept_alpha got a value that was not a number: %s" % alpha ) 754 except :757 except Exception as exc: 755 758 # No estimate or bad estimate, either do nothing 756 logger.error("InversionControl._on_accept_alpha: %s" % sys.exc_value)759 logger.error("InversionControl._on_accept_alpha: %s" % exc) 757 760 758 761 def _on_accept_nterms(self, evt): … … 768 771 except ValueError: 769 772 logger.error("InversionControl._on_accept_nterms got a value that was not a number: %s" % nterms ) 770 except :773 except Exception as exc: 771 774 # No estimate or bad estimate, either do nothing 772 logger.error("InversionControl._on_accept_nterms: %s" % sys.exc_value)775 logger.error("InversionControl._on_accept_nterms: %s" % exc) 773 776 774 777 def clear_panel(self): … … 901 904 message += "than the number of points" 902 905 wx.PostEvent(self._manager.parent, StatusEvent(status=message)) 903 raise ValueError , message906 raise ValueError(message) 904 907 self.nfunc_ctl.SetBackgroundColour(wx.WHITE) 905 908 self.nfunc_ctl.Refresh() … … 957 960 Invoke the d_max exploration dialog 958 961 """ 959 from explore_dialog import ExploreDialog962 from .explore_dialog import ExploreDialog 960 963 if self._manager._last_pr is not None: 961 964 pr = self._manager._create_plot_pr() … … 1008 1011 self._on_invert(None) 1009 1012 self._set_analysis(True) 1010 except :1011 msg = "InversionControl._change_file: %s" % sys.exc_value1013 except Exception as exc: 1014 msg = "InversionControl._change_file: %s" % exc 1012 1015 logger.error(msg) 1013 1016
Note: See TracChangeset
for help on using the changeset viewer.