Skip to content

Commit

Permalink
Check that the DisplayImpl provides _show()
Browse files Browse the repository at this point in the history
In particular, this means that setDefaultBackend("ds9") will succeed iff
display_ds9 is setup.

N.b. lsst.afw.display.ds9 provides a DisplayImpl that throws when created,
but this allows us to check for a valid display without instantiating it.
  • Loading branch information
RobertLuptonTheGood committed Oct 26, 2016
1 parent b0412c4 commit 1c5cffb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/afw/display/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _makeDisplayImpl(display, backend, *args, **kwargs):
# Copy the exception into outer scope
exc = e

if not _disp:
if not _disp or not hasattr(_disp.DisplayImpl, "_show"):
if exc is not None:
# re-raise the final exception
raise exc
Expand Down

0 comments on commit 1c5cffb

Please sign in to comment.