Changeset 5251ec6 in sasview for src/sas/sasgui/perspectives/calculator/slit_length_calculator_panel.py
- Timestamp:
- Oct 11, 2018 2: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/calculator/slit_length_calculator_panel.py
rd788619 r5251ec6 17 17 from sas.sasgui.guiframe.events import StatusEvent 18 18 from sas.sascalc.calculator.slit_length_calculator import SlitlengthCalculator 19 from calculator_widgets import OutputTextCtrl20 from calculator_widgets import InterActiveOutputTextCtrl21 19 from sas.sasgui.perspectives.calculator import calculator_widgets as widget 22 20 from sas.sasgui.guiframe.documentation_window import DocumentationWindow 21 from .calculator_widgets import OutputTextCtrl 22 from .calculator_widgets import InterActiveOutputTextCtrl 23 23 24 24 _BOX_WIDTH = 76 … … 163 163 164 164 dlg = wx.FileDialog(self, "Choose a file", location, 165 "", wildcard, wx. OPEN)165 "", wildcard, wx.FD_OPEN) 166 166 if dlg.ShowModal() == wx.ID_OK: 167 167 path = dlg.GetPath() … … 223 223 self.reader.queue() 224 224 self.load_update() 225 except :225 except Exception as exc: 226 226 if self.parent.parent is None: 227 227 return 228 msg = "Slit Length Calculator: %s" % (sys.exc_value)228 msg = "Slit Length Calculator: %s" % exc 229 229 wx.PostEvent(self.parent.parent, 230 230 StatusEvent(status=msg, type='stop')) … … 264 264 if x == [] or x is None or y == [] or y is None: 265 265 msg = "The current data is empty please check x and y" 266 raise ValueError , msg266 raise ValueError(msg) 267 267 slit_length_calculator = SlitlengthCalculator() 268 268 slit_length_calculator.set_data(x=x, y=y) 269 269 slit_length = slit_length_calculator.calculate_slit_length() 270 except :270 except Exception as exc: 271 271 if self.parent.parent is None: 272 272 return 273 msg = "Slit Size Calculator: %s" % (sys.exc_value)273 msg = "Slit Size Calculator: %s" % exc 274 274 wx.PostEvent(self.parent.parent, 275 275 StatusEvent(status=msg, type='stop'))
Note: See TracChangeset
for help on using the changeset viewer.