Skip to content

Commit 4e2d0d3

Browse files
committed
fixed chaecking of response validity
1 parent d687671 commit 4e2d0d3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## Changes in 0.1.3 (in development)
2+
* Fixed checking of response validity
23

34
## Changes in 0.1.2
45
* Added default file to KASSANDRA kerchunk store to account for case when no online

doors_stores/kassandrastore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ def __init__(self):
6767

6868
def _read_das(self) -> Dict:
6969
response = requests.get(KASSANDRA_DATASET_ATTRIBUTE_STRUCTURE)
70-
if response.status_code != 200:
70+
if not response.ok:
7171
return {}
7272
das_content = response.text
7373
return parse_das(das_content)
7474

7575
def _get_num_timesteps(self) -> int:
7676
response = requests.get(KASSANDRA_DATASET_DESCRIPTOR_STRUCTURE)
77-
if response != 200:
77+
if not response.ok:
7878
return 0
7979
dds = DDSParser(response.text).parse()
8080
return dds.get("time").size

0 commit comments

Comments
 (0)