Skip to content

Commit

Permalink
Merge pull request #110 from dstansby/no-data-error
Browse files Browse the repository at this point in the history
Raise error when no data present
  • Loading branch information
dstansby committed Nov 9, 2020
2 parents c198bdc + f7787ca commit d643d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cdflib/cdfread.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def varget(self, variable=None, epoch=None, starttime=None,
return vdr_info
else:
if (vdr_info['max_records'] < 0):
return
raise ValueError(f'No records found for variable {variable}')

return self._read_vardata(vdr_info, epoch=epoch, starttime=starttime, endtime=endtime,
startrec=startrec, endrec=endrec, record_range_only=record_range_only,
Expand Down

0 comments on commit d643d5c

Please sign in to comment.