Debian Codegraph @

debian/patches/Set-a-default-path-for-PYSYN_CDBS.patch

raw
1 From: Ole Streicher <[email protected]>
2 Date: Sat, 5 Nov 2016 21:08:41 +0100
3 Subject: Set a default path for PYSYN_CDBS
4
5 In Debian, the data files are installed in /usr/share/synphot on
6 default. So, the environment variable needs to be set only if
7 different files are used.
8 ---
9 pysynphot/locations.py | 7 +------
10 1 file changed, 1 insertion(+), 6 deletions(-)
11
12 diff --git a/pysynphot/locations.py b/pysynphot/locations.py
13 index 84e5d07..c22e6ce 100644
14 --- a/pysynphot/locations.py
15 +++ b/pysynphot/locations.py
16 @@ -40,12 +40,7 @@ import warnings
17 from astropy.io import fits as pyfits
18 from bs4 import BeautifulSoup
19
20 -try:
21 - rootdir = os.environ['PYSYN_CDBS']
22 -except KeyError:
23 - warnings.warn("PYSYN_CDBS is undefined; functionality will be SEVERELY "
24 - "crippled.")
25 - rootdir = ''
26 +rootdir = os.environ.get('PYSYN_CDBS', '/usr/share/synphot')
27
28 ftp_rootdir = 'https://ssb.stsci.edu/trds'
29