Skip to content

Commit

Permalink
Allow readers to accept pathlib.Path instances as filenames.
Browse files Browse the repository at this point in the history
  • Loading branch information
honnorat committed Oct 9, 2018
1 parent 2f45b54 commit d5d0631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion satpy/readers/yaml_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_filebase(path, pattern):
"""Get the end of *path* of same length as *pattern*."""
# A pattern can include directories
tail_len = len(pattern.split(os.path.sep))
return os.path.join(*path.split(os.path.sep)[-tail_len:])
return os.path.join(*str(path).split(os.path.sep)[-tail_len:])


def match_filenames(filenames, pattern):
Expand Down

0 comments on commit d5d0631

Please sign in to comment.