Skip to content

Commit

Permalink
Fix example usage (#739)
Browse files Browse the repository at this point in the history
Code example does not work with python 3.6.
A colon is required so that the X is recognized as formatting specifier.
  • Loading branch information
ptoews authored and hardbyte committed Dec 23, 2019
1 parent 638bbeb commit e11725d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Example usage
# iterate over received messages
for msg in bus:
print("{X}: {}".format(msg.arbitration_id, msg.data))
print("{:X}: {}".format(msg.arbitration_id, msg.data))
# or use an asynchronous notifier
notifier = can.Notifier(bus, [can.Logger("recorded.log"), can.Printer()])
Expand Down

0 comments on commit e11725d

Please sign in to comment.