Skip to content

Commit

Permalink
Decode paths to Python strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Prescod committed Jun 10, 2020
1 parent 81f45da commit 6fdb061
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion snowfakery/parse_recipe_yaml.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from os import fsdecode
from numbers import Number
from datetime import date
from contextlib import contextmanager
Expand Down Expand Up @@ -471,7 +472,7 @@ def parse_top_level_elements(path: Path, data: List, context: ParseContext):
def parse_file(stream: IO[str], context: ParseContext) -> List[Dict]:
stream_name = getattr(stream, "name", None)
if stream_name:
path = Path(stream.name).absolute()
path = Path(fsdecode(stream.name)).absolute()
else:
path = Path("<stream>")
data, line_numbers = yaml_safe_load_with_line_numbers(stream, str(path))
Expand Down

0 comments on commit 6fdb061

Please sign in to comment.