Merge pull request #4 from leres/master

Minor python3 fixes; pick up print_function from futures and
This commit is contained in:
Michael Balzer 2019-07-27 17:09:58 +02:00 committed by GitHub
commit c3465e05c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,6 +33,8 @@
# spachner21 in the Silicon Labs Interface Forum. It is provided here
# as public domain.
from __future__ import print_function
import sys
import serial.tools.list_ports
@ -49,10 +51,10 @@ pl.sort(key=lambda x: x.location, reverse=False)
if len(sys.argv) > 1:
for p in pl:
if str(p.location) == sys.argv[1]:
print p.device
print(p.device)
break
else:
print sys.argv[1]
print(sys.argv[1])
else:
for p in pl:
print p.location + " " + p.device
print(p.location + " " + p.device)