Skip to content

Commit

Permalink
#49 XmlAssembler should set end_of_doc when flushing a new doc
Browse files Browse the repository at this point in the history
  • Loading branch information
justb4 committed Aug 7, 2016
1 parent 16e9646 commit f121329
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions stetl/filters/xmlassembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ def consume_element(self, packet):
# Always move the data (element) from packet
element = packet.consume()

if element is None or packet.is_end_of_stream() is True:
return packet

self.total_element_count += 1
if element:
self.total_element_count += 1
self.element_arr.append(element)

self.element_arr.append(element)
return packet

def flush_elements(self, packet):
packet.set_end_of_doc()

if len(self.element_arr) == 0:
return packet

Expand Down

0 comments on commit f121329

Please sign in to comment.