From: Ole Streicher Date: Sat, 5 Nov 2016 21:08:41 +0100 Subject: Set a default path for PYSYN_CDBS In Debian, the data files are installed in /usr/share/synphot on default. So, the environment variable needs to be set only if different files are used. --- pysynphot/locations.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pysynphot/locations.py b/pysynphot/locations.py index 84e5d07..c22e6ce 100644 --- a/pysynphot/locations.py +++ b/pysynphot/locations.py @@ -40,12 +40,7 @@ import warnings from astropy.io import fits as pyfits from bs4 import BeautifulSoup -try: - rootdir = os.environ['PYSYN_CDBS'] -except KeyError: - warnings.warn("PYSYN_CDBS is undefined; functionality will be SEVERELY " - "crippled.") - rootdir = '' +rootdir = os.environ.get('PYSYN_CDBS', '/usr/share/synphot') ftp_rootdir = 'https://ssb.stsci.edu/trds'