Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions aeroolib/plugins/opendocument.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,7 @@ def _handle_column_loops(self, statement, ancestor, opening,
repeat_tag = '{%s}repeat' % AEROO_URI

# table node (it is not necessarily the direct parent of ancestor)
table_node = ancestor.iterancestors('{%s}table' % table_namespace) \
.next()
table_node = next(ancestor.iterancestors('{%s}table' % table_namespace))
table_name = table_node.attrib['{%s}name' % table_namespace]

# add counting instructions
Expand Down Expand Up @@ -643,7 +642,7 @@ def _handle_row_spanned_column_loops(self, statement, outer_o_node,
assert row_node.tag == table_row_tag
next_rows = row_node.itersiblings(table_row_tag)
for row_idx in range(rows_spanned-1):
next_row_node = next_rows.next()
next_row_node = next(next_rows)
rows_to_wrap.append(next_row_node)
# compute the start and end nodes
first = next_row_node[opening_pos]
Expand Down Expand Up @@ -1017,7 +1016,7 @@ def check_new_lines(self, tree, namespaces):
next_child = new_parent_node
try:
while(True):
curr_child = parent_children.next()
curr_child = next(parent_children)
if curr_child.tag=='{%s}span' % namespaces['text'] and tag.text==curr_child.text:
new_span_node = EtreeElement('{%s}span' % namespaces['text'],
attrib=tag.attrib,
Expand Down Expand Up @@ -1047,14 +1046,14 @@ def check_new_lines(self, tree, namespaces):
try:
next_text = True
while(next_text):
next_child = parent_children.next()
next_child = next(parent_children)
curr_child.append(next_child)
next_text = next_child.text
except StopIteration:
pass
try:
while(True):
next_child = parent_children.next()
next_child = next(parent_children)
if not next_child.text:
curr_child.append(next_child)
else:
Expand Down