Skip to content

Commit

Permalink
Correct documentation example error; bump version to 0.13.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TE-StephenTiedemann committed Nov 2, 2017
1 parent c1318f0 commit 6083f9c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/nfc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

# METADATA ####################################################################

__version__ = "0.13.2"
__version__ = "0.13.3"

__title__ = "nfcpy"
__description__ = "Python module for Near Field Communication."
Expand Down
13 changes: 6 additions & 7 deletions src/nfc/tag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,16 +188,15 @@ def records(self):
import ndef
tag.ndef.records = [ndef.TextRecord('Hello World')]
Decoding and encoding are performed with a relaxed error
handling strategy that ignores minor errors in the NDEF
data. The `ndeflib <https://ndeflib.readthedocs.io>`_ does
also support 'strict' and 'ignore' error handling which
may be used like so::
Decoding is performed with a relaxed error handling
strategy that ignores minor errors in the NDEF data. The
`ndeflib <https://ndeflib.readthedocs.io>`_ does also
support 'strict' and 'ignore' error handling which may be
used like so::
from ndef import message_decoder, message_encoder
records = message_decoder(tag.ndef.octets, errors='strict')
octets = b''.join(message_encoder(records, errors='strict'))
tag.ndef.octets = octets
tag.ndef.octets = b''.join(message_encoder(records))
"""
return list(message_decoder(self.octets, errors='relax'))
Expand Down

0 comments on commit 6083f9c

Please sign in to comment.