Skip to content

Commit

Permalink
Remove compat code for old dask versions (#119)
Browse files Browse the repository at this point in the history
async is a keyword now in python 3.7. So just having that line there causes a SyntaxError that cannot be caught.
  • Loading branch information
TimoRoth authored and fmaussion committed Aug 8, 2018
1 parent 6b660ad commit ce6482b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions salem/sio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1127,12 +1127,7 @@ def open_mf_wrf_dataset(paths, chunks=None, compat='no_conflicts', lock=None,
raise IOError('no files to open')

# TODO: current workaround to dask thread problems
try:
# dask < 0.16
get = dask.async.get_sync
except AttributeError:
get = dask.get
dask.set_options(get=get)
dask.set_options(get=dask.get)

if lock is None:
lock = _default_lock(paths[0], 'netcdf4')
Expand Down

0 comments on commit ce6482b

Please sign in to comment.