Skip to content

Commit

Permalink
Fix ValueError in nwm.build_streamflow_cube when getting truth value …
Browse files Browse the repository at this point in the history
…of "comids" variable. Now check for None and len>0.
  • Loading branch information
twhiteaker committed Oct 4, 2016
1 parent 98b5627 commit fdf5b4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pynwm/nwm.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def build_streamflow_cube(nc_files, comids=None, consistent_comid_order=True,

if not len(nc_files):
return
if comids:
if comids is not None and len(comids) > 0:
if type(comids[0]) is str:
comids = [int(comid) for comid in comids]
if type(comids) != 'numpy.ndarray':
Expand Down

0 comments on commit fdf5b4f

Please sign in to comment.