From d39f34221dd05ec82bf6d79d2066a2eaa147b2e0 Mon Sep 17 00:00:00 2001 From: Keegi Date: Tue, 7 Jun 2011 18:11:45 +0300 Subject: [PATCH] Don't auto-pick last used port when that port is not in detected ports list --- pronsole.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pronsole.py b/pronsole.py index 53ff1db..b9b4864 100644 --- a/pronsole.py +++ b/pronsole.py @@ -144,7 +144,7 @@ class pronsole(cmd.Cmd): a=l.split() p=self.scanserial() port=self.lastport[0] - if port is None and len(p)>0: + if (port is None or port not in p) and len(p)>0: port=p[0] baud=self.lastport[1] or 115200 if(len(a)>0):