Skip to content

Commit

Permalink
bugfix, wrong exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorezzz committed Feb 2, 2024
1 parent 5e1c38b commit 0c5fc7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pygrb_lc
version = 0.3.7.1
version = 0.3.7.2
author = Mozgunov Georgiy
author_email = georgiy99@bk.ru
description = Python package for GRB analysis
Expand Down
3 changes: 2 additions & 1 deletion src/pygrb_lc/light_curves/light_curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import matplotlib as mpl
import requests
import pandas as pd
import urllib.error

from .transformations import rebin_data
from ..config import LIGHT_CURVE_SAVE
Expand Down Expand Up @@ -536,7 +537,7 @@ def load_fits(url: str, file_extension: str = 'fit', save = True):
with open(f"{LIGHT_CURVE_SAVE}{url.split('/')[-1]}_v0{i}.pkl", "wb") as f:
pickle.dump(data, f)
return data
except requests.exceptions.HTTPError:
except (urllib.error.HTTPError, requests.exceptions.HTTPError):
pass
raise ValueError(f'No data found for {url}_v0{i}.{file_extension}')

Expand Down

0 comments on commit 0c5fc7d

Please sign in to comment.