Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Merging dev with main. Missing parenthesis in data server communication
error code report fixed.
  • Loading branch information
dutta-alankar committed Apr 29, 2024
2 parents 3158681 + 058a43c commit 5319f07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions astro_plasma/core/download_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def fetch_list_from_url(link_list_url: str) -> List[str]:
# print(link_list_url)
response = requests.get(link_list_url, stream=True)
if response.status_code != 200:
sys.exit(f"Problem communicating with dataserver! (error code: {response.status_code}")
sys.exit(f"Problem communicating with dataserver! (error code: {response.status_code})")
# print(response)
links = response.content.decode("utf-8").split("\n")
return links
Expand All @@ -36,7 +36,7 @@ def get_filename(url: str) -> str:
try:
with requests.get(url, stream=True) as req:
if req.status_code != 200:
sys.exit(f"Problem communicating with dataserver! (error code: {req.status_code}")
sys.exit(f"Problem communicating with dataserver! (error code: {req.status_code})")
if content_disposition := req.headers.get("Content-Disposition"):
param, options = werkzeug.http.parse_options_header(content_disposition)
if param == "attachment" and (filename := options.get("filename")):
Expand Down

0 comments on commit 5319f07

Please sign in to comment.