Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
#153, ODP datasource, make_local better local_name value check
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzysztof (Chris) Bernat committed Mar 20, 2017
1 parent a90f3d7 commit 63a2ab4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cate/ds/esa_cci_odp.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,10 @@ def make_local(self,
region: GeometryLike.TYPE = None,
var_names: VariableNamesLike.TYPE = None,
monitor: Monitor = Monitor.NONE) -> 'DataSource':
if not local_name or len(local_name) == 0:
raise ValueError('Missing local_name')
if not local_name:
raise ValueError('local_name is required')
elif len(local_name) == 0:
raise ValueError('local_name cannot be empty')

time_range = TimeRangeLike.convert(time_range) if time_range else None
region = GeometryLike.convert(region) if region else None
Expand Down

0 comments on commit 63a2ab4

Please sign in to comment.