Skip to content

Commit

Permalink
fix: @fs_cache fails on Python3 when index_col is set by numeric index
Browse files Browse the repository at this point in the history
  • Loading branch information
user2589 committed Mar 15, 2019
1 parent b72cf04 commit 4762049
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stutils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def __init__(self, func, cache_dir='', app_name='', cache_type='', idx=1,
self.cache_path = mkdir(cache_dir or DEFAULT_PATH, app_name, cache_type)

if isinstance(idx, int):
idx = range(idx)
# Python3 range objects won't work, so explicitly convert to list
idx = list(range(idx))
self.idx = idx

def get_cache_fname(self, *args):
Expand Down

0 comments on commit 4762049

Please sign in to comment.