Skip to content

Commit

Permalink
Avoid KeyError in RTD build [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Feb 20, 2017
1 parent 017683f commit ea29c35
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pysynphot/locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"crippled.")
rootdir = ''

ftp_rootdir = 'ftp://ftp.stsci.edu/cdbs'

# Data directory is now installed locally
specdir = os.path.join(os.path.dirname(__file__), 'data')
Expand Down Expand Up @@ -301,8 +302,9 @@ def get_latest_file(template, raise_error=False, err_msg=''):


def _refTable(template):
return get_latest_file(os.path.join(os.environ['PYSYN_CDBS'], template),
raise_error=True)
return get_latest_file(
os.path.join(os.environ.get('PYSYN_CDBS', ftp_rootdir), template),
raise_error=True)

RedLaws = {}

Expand Down

0 comments on commit ea29c35

Please sign in to comment.