summaryrefslogtreecommitdiff
path: root/tools/glib-client-gen.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/glib-client-gen.py')
-rw-r--r--tools/glib-client-gen.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/glib-client-gen.py b/tools/glib-client-gen.py
index 446d198f4..c94bd2c31 100644
--- a/tools/glib-client-gen.py
+++ b/tools/glib-client-gen.py
@@ -27,6 +27,7 @@ import os.path
import xml.dom.minidom
from getopt import gnu_getopt
+from libtpcodegen import file_set_contents
from libglibcodegen import Signature, type_to_gtype, cmp_by_name, \
get_docstring, xml_escape, get_deprecated
@@ -1228,10 +1229,9 @@ class Generator(object):
self.h('G_END_DECLS')
self.h('')
- open(self.basename + '.h', 'w').write('\n'.join(self.__header))
- open(self.basename + '-body.h', 'w').write('\n'.join(self.__body))
- open(self.basename + '-gtk-doc.h', 'w').write('\n'.join(self.__docs))
-
+ file_set_contents(self.basename + '.h', '\n'.join(self.__header))
+ file_set_contents(self.basename + '-body.h', '\n'.join(self.__body))
+ file_set_contents(self.basename + '-gtk-doc.h', '\n'.join(self.__docs))
def types_to_gtypes(types):
return [type_to_gtype(t)[1] for t in types]