Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only set default backend to ds9 if no default is set #382

Merged
merged 1 commit into from
Aug 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/lsst/afw/display/ds9.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@

import lsst.afw.display
import lsst.afw.image as afwImage
from .interface import getDisplay as _getDisplay, setDefaultBackend
from .interface import getDisplay as _getDisplay, getDefaultBackend, setDefaultBackend
# Backwards compatibility. Downstream code should be converted to use display.RED etc.
from .interface import BLACK, RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, WHITE # noqa F401
try:
loaded
except NameError:
try:
setDefaultBackend("lsst.display.ds9")
if getDefaultBackend() is None:
setDefaultBackend("lsst.display.ds9")
getDisplay = _getDisplay
except Exception as e:
# No usable version of display_ds9.
Expand Down