Ticket #11092 (closed: fixed)
Instrument view, python interface: inst_view.selectComponent() crashes Mantid if wrong component name given
Reported by: | Federico M Pouzols | Owned by: | Federico M Pouzols |
---|---|---|---|
Priority: | major | Milestone: | Release 3.4 |
Component: | Python | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Harry Jeffery |
Description
While checking the training course material (http://www.mantidproject.org/Instrument_View_Control) I found that in the Python interface to control the Instrument View, if you do this:
instrument_view.selectComponent("component-name") with an invalid component name you will get an uncaught exception, and sometimes Mantid will crash.
It seems that the input component name should be checked.
Change History
comment:2 Changed 5 years ago by Federico Montesino Pouzols
- Status changed from assigned to inprogress
if not found in tree, show qmessagebox error (don't throw), re #11092
Changeset: 1cfc42eba528bfd5c54ac39beea26faaabf140b1
comment:3 Changed 5 years ago by Federico Montesino Pouzols
- Status changed from inprogress to verify
- Resolution set to fixed
This is being verified as pull request #580.
comment:4 Changed 5 years ago by Harry Jeffery
- Status changed from verify to verifying
- Tester set to Harry Jeffery
comment:5 Changed 5 years ago by Harry Jeffery
- Status changed from verifying to closed
Merge pull request #580 from mantidproject/11092_instrument_view_python_selectComponent_uncaught_exception
If component not found in instrument tree, mantid should not crash
Full changeset: 4b524cae335acf175bd335169ecfa7e805ea60bf
comment:6 Changed 5 years ago by Federico Montesino Pouzols
if not found in tree, show qmessagebox error (don't throw), re #11092
Changeset: a3adeb64a6cf28c09efbb818679092aea2786acf