summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@unixuser.org>2013-02-28 19:16:24 +0900
committerDaiki Ueno <ueno@unixuser.org>2013-02-28 19:20:23 +0900
commitc19a148913b51981cef3229601eb95178569678b (patch)
treeef89e1c51d3c910ca8f5d300545d3929bc24ca5d
parent0cf2fda3beaa20c7638af9015180f91a72f960f4 (diff)
downloadcaribou-c19a148913b51981cef3229601eb95178569678b.tar.gz
Fix errors when building with python 3
https://bugzilla.gnome.org/show_bug.cgi?id=694480
-rwxr-xr-xtools/fix_gir.py4
-rwxr-xr-xtools/make_schema.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/tools/fix_gir.py b/tools/fix_gir.py
index 30bd878..182d108 100755
--- a/tools/fix_gir.py
+++ b/tools/fix_gir.py
@@ -42,7 +42,7 @@ if __name__ == "__main__":
import sys
if len(sys.argv) != 2:
- print "supply a gir file"
+ print("supply a gir file")
sys.exit(1)
dom = minidom.parse(sys.argv[-1])
@@ -50,4 +50,4 @@ if __name__ == "__main__":
purge_white_space_and_fix_namespace(dom)
fix_vfuncs(dom)
- print dom.toprettyxml(indent=" ", newl="\n")
+ print(dom.toprettyxml(indent=" ", newl="\n"))
diff --git a/tools/make_schema.py b/tools/make_schema.py
index f8386dc..5633594 100755
--- a/tools/make_schema.py
+++ b/tools/make_schema.py
@@ -3,7 +3,7 @@
from gi.repository import GLib
import xml.dom.minidom
-import os,sys
+import os, sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from caribou.settings import caribou_settings
@@ -27,10 +27,10 @@ class SchemasMaker:
fp.close()
def _attribs(self, e):
- if not e.attributes.items():
+ if not list(e.attributes.items()):
return ""
- return ' ' + ' '.join(['%s="%s"' % (k,v) \
- for k,v in e.attributes.items()])
+ return ' ' + ' '.join(['%s="%s"' % (k, v) \
+ for k, v in list(e.attributes.items())])
def _pretty_xml(self, fp, e, indent=0):
if not e.childNodes or \