Skip to content

Commit ad0e562

Browse files
committed
fix: remove exception for python 3.7 users
1 parent e73f585 commit ad0e562

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
### Fixed
2222

2323
* `cdshealpix` and `matplotlib` are now truly optional [#201]
24+
* remove exception on OSError in `from_fits` that was hiding true errors [#203]
2425

2526
## [0.19.0]
2627

python/mocpy/abstract_moc.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -547,14 +547,8 @@ def from_fits(cls, path_or_url, timeout=1000):
547547
if isinstance(path_or_url, BytesIO):
548548
return cls._from_fits_raw_bytes(path_or_url.read())
549549

550-
# this try except clause is there to support
551-
# Windows users with python 3.7 and should be dropped
552-
# when we remove support of python 3.7
553-
try:
554-
if Path(path_or_url).is_file():
555-
return cls.load(path_or_url, format="fits")
556-
except OSError:
557-
pass
550+
if Path(path_or_url).is_file():
551+
return cls.load(path_or_url, format="fits")
558552

559553
try:
560554
import requests

0 commit comments

Comments
 (0)