Permalink
Browse files

avoid losing the com ports list (because sort() works in-place)

  • Loading branch information...
1 parent b9140c3 commit bd536e42b266be2ea56be2d623c911c442dcc180 @m0mchil committed Nov 9, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 ioutil.py
View
@@ -28,7 +28,8 @@ def find_serial_by_id(check, product_id):
def find_com_ports(check):
ports = []
if WINDOWS:
- com_ports = [p[0] for p in list_ports.comports()].sort()
+ com_ports = [p[0] for p in list_ports.comports()]
+ com_ports.sort()
for port in com_ports:
if check(port, False):
ports.append(port)

0 comments on commit bd536e4

Please sign in to comment.