From 403ebcfcc6bcf95b1ef914de48ac5509c284b150 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Fri, 4 Jan 2013 11:28:17 +0100 Subject: sync tools/ with telepathy-glib This should allow Empathy to be build with Python 3. https://bugzilla.gnome.org/show_bug.cgi?id=687616 --- tools/glib-interfaces-gen.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tools/glib-interfaces-gen.py') diff --git a/tools/glib-interfaces-gen.py b/tools/glib-interfaces-gen.py index 410762cde..b67d7b4f0 100644 --- a/tools/glib-interfaces-gen.py +++ b/tools/glib-interfaces-gen.py @@ -3,7 +3,7 @@ from sys import argv, stdout, stderr import xml.dom.minidom -from libtpcodegen import file_set_contents +from libtpcodegen import file_set_contents, u from libglibcodegen import NS_TP, get_docstring, \ get_descendant_text, get_by_path @@ -24,22 +24,22 @@ class Generator(object): self.spec = get_by_path(dom, "spec")[0] def h(self, code): - self.decls.append(code.encode('utf-8')) + self.decls.append(code) def c(self, code): - self.impls.append(code.encode('utf-8')) + self.impls.append(code) def d(self, code): - self.docs.append(code.encode('utf-8')) + self.docs.append(code) def __call__(self): for f in self.h, self.c: self.do_header(f) self.do_body() - file_set_contents(self.implfile, ''.join(self.impls)) - file_set_contents(self.declfile, ''.join(self.decls)) - file_set_contents(self.docfile, ''.join(self.docs)) + file_set_contents(self.implfile, u('').join(self.impls).encode('utf-8')) + file_set_contents(self.declfile, u('').join(self.decls).encode('utf-8')) + file_set_contents(self.docfile, u('').join(self.docs).encode('utf-8')) # Header def do_header(self, f): -- cgit v1.2.3