Skip to content

Commit

Permalink
Merge pull request #1537 from pypeit/s3_url_hotfix
Browse files Browse the repository at this point in the history
HOTFIX: Add correct exception to ``pypeit.data._get_s3_hostname()``
  • Loading branch information
profxj authored Feb 17, 2023
2 parents a4777c6 + 6878f66 commit c805de2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- (Hotfix) Specify sphinx versions to correctly work with
sphinx_rtd_theme
- (Hotfix) Fixed bug that caused crash of sensfunc routines using
telluric grids in offline processing
- (Hotfix) Fixed error when showing flats in Ginga when the fine correction is not performed
- Implemented the upgraded GTC/OSIRIS+
- (Hotfix) keymap error when displaying GUIs
Expand Down
9 changes: 7 additions & 2 deletions pypeit/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"""
import os
import shutil
import urllib
import urllib.error

import astropy.utils.data
import github
Expand Down Expand Up @@ -695,7 +695,12 @@ def _get_s3_hostname():
filepath = astropy.utils.data.download_file(
remote_url, cache="update", timeout=10, pkgname="pypeit"
)
except (urllib.error.URLError, github.GithubException):
except (
requests.exceptions.ConnectionError,
requests.exceptions.RequestException,
urllib.error.URLError,
github.GithubException
):
filepath = os.path.join(Paths.data, "s3_url.txt")

# Open the file and return the URL
Expand Down

0 comments on commit c805de2

Please sign in to comment.