Skip to content

Commit

Permalink
Implement suggestion by @phackstock
Browse files Browse the repository at this point in the history
Co-authored-by: Philip Hackstock <p.hackstock@gmx.at>
  • Loading branch information
danielhuppmann and phackstock authored Mar 2, 2022
1 parent e825143 commit d5e95e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyam/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _init(self, data, meta=None, index=DEFAULT_META_INDEX, **kwargs):
_data = read_ix(data, **kwargs)

# read from file
elif isstr(data) or isinstance(data, (LocalPath, Path)):
elif isinstance(data, (str, LocalPath, Path)):
data = Path(data) # casting str or LocalPath to Path
if not data.is_file():
raise FileNotFoundError(f"No such file: '{data}'")
Expand Down

0 comments on commit d5e95e1

Please sign in to comment.