diff options
Diffstat (limited to 'gi/_gtktemplate.py')
-rw-r--r-- | gi/_gtktemplate.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gi/_gtktemplate.py b/gi/_gtktemplate.py index 925aa0dd..f253887e 100644 --- a/gi/_gtktemplate.py +++ b/gi/_gtktemplate.py @@ -17,6 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 # USA +import os from collections import abc from functools import partial @@ -296,7 +297,7 @@ class Template(object): return cls else: assert self.filename is not None - file_ = Gio.File.new_for_path(self.filename) + file_ = Gio.File.new_for_path(os.fspath(self.filename)) bytes_ = GLib.Bytes.new(file_.load_contents()[1]) cls.set_template(bytes_) register_template(cls) |