Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion branca/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from urllib.request import urlopen
from binascii import hexlify
from os import urandom
from pathlib import Path

from jinja2 import Environment, PackageLoader, Template

Expand Down Expand Up @@ -159,7 +160,7 @@ def save(self, outfile, close_file=True, **kwargs):
close_file : bool, default True
Whether the file has to be closed after write.
"""
if isinstance(outfile, str) or isinstance(outfile, bytes):
if isinstance(outfile, (str, bytes, Path)):
fid = open(outfile, 'wb')
else:
fid = outfile
Expand Down