summaryrefslogtreecommitdiff
path: root/comments.py
diff options
context:
space:
mode:
authorAnthon van der Neut <anthon@mnt.org>2017-08-13 14:32:00 +0200
committerAnthon van der Neut <anthon@mnt.org>2017-08-13 14:32:00 +0200
commitcbc411c5a3ecb684af18b89d8fbc41487e61d312 (patch)
tree5b923148cda1b1e4ee249b782bc6af3c2a8d008d /comments.py
parent6cbc0bea18deff5ee125c37caee5e546de02b7be (diff)
downloadruamel.yaml-cbc411c5a3ecb684af18b89d8fbc41487e61d312.tar.gz
issue #61: merge of merge cannot be __repr__-ed (reported by Tal Liron)0.15.28
**When this change resolves your problem, then please close this issue**
Diffstat (limited to 'comments.py')
-rw-r--r--comments.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/comments.py b/comments.py
index 9c65cf2..00f57de 100644
--- a/comments.py
+++ b/comments.py
@@ -851,14 +851,14 @@ class CommentedMap(ordereddict, CommentedBase):
yield x, ordereddict.__getitem__(self, x)
done = [] # type: List[Any] # list of processed merge items, kept for masking
for merged in getattr(self, merge_attrib, []):
- for x in merged[1]:
+ for x, v in merged[1].items():
if ordereddict.__contains__(self, x):
continue
for y in done:
if x in y:
break
else:
- yield x, ordereddict.__getitem__(merged[1], x)
+ yield x, v # ordereddict.__getitem__(merged[1], x)
done.append(merged[1])
if PY2: