summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2017-12-07 19:17:06 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-03-10 19:05:19 +0530
commitb9693d3ad11cb6861cfb088223e791f1eb50385b (patch)
tree9405e0c7962c8d3cb07f09832124de9e15e78c9c
parent2034e303ada98b51d081aec02e0ed9a2546c266b (diff)
downloadgobject-introspection-b9693d3ad11cb6861cfb088223e791f1eb50385b.tar.gz
giscanner: Fix minor python3 compatibility issue
dict.items() returns a tuple in Python2 but it returns an iterator in Python3. This is usually fine, except that in this place we also try to index the return value which won't work with iterators.
-rw-r--r--giscanner/maintransformer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 275f1c08..e5e77338 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -896,7 +896,7 @@ class MainTransformer(object):
# the number of parameters (@foo) is the same or greater
# than the number of signal parameters
if len(block.params) > len(signal.parameters):
- names = block.params.items()
+ names = [(k, v) for k, v in block.params.items()]
# Resolve real parameter names early, so that in later
# phase we can refer to them while resolving annotations.
for i, param in enumerate(signal.parameters):