Skip to content

Commit

Permalink
Corrects condition logic around sending ION_VERSION_MARKER_EVENT to w…
Browse files Browse the repository at this point in the history
…riter (#111)
  • Loading branch information
Peter Cornell committed Oct 17, 2019
1 parent 3908afc commit 9c6b74a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion amazon/ion/simpleion.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def dump(obj, fp, imports=None, binary=True, sequence_as_stream=False, skipkeys=
raw_writer = binary_writer(imports) if binary else text_writer(indent=indent)
writer = blocking_writer(raw_writer, fp)
from_type = _FROM_TYPE_TUPLE_AS_SEXP if tuple_as_sexp else _FROM_TYPE
if not binary and not omit_version_marker:
if binary or not omit_version_marker:
writer.send(ION_VERSION_MARKER_EVENT) # The IVM is emitted automatically in binary; it's optional in text.
if sequence_as_stream and isinstance(obj, (list, tuple)):
# Treat this top-level sequence as a stream; serialize its elements as top-level values, but don't serialize the
Expand Down

0 comments on commit 9c6b74a

Please sign in to comment.