miniterm: workaround for non ASCII port descriptions
printing the list of ports may fail with UnicodeEncodeError.
workaround using repr.
fixes #237
diff --git a/serial/tools/miniterm.py b/serial/tools/miniterm.py
index c5f8b8c..88307c6 100644
--- a/serial/tools/miniterm.py
+++ b/serial/tools/miniterm.py
@@ -315,7 +315,7 @@
sys.stderr.write('\n--- Available ports:\n')
ports = []
for n, (port, desc, hwid) in enumerate(sorted(comports()), 1):
- sys.stderr.write('--- {:2}: {:20} {}\n'.format(n, port, desc))
+ sys.stderr.write('--- {:2}: {:20} {!r}\n'.format(n, port, desc))
ports.append(port)
while True:
port = raw_input('--- Enter port index or full name: ')