Don't auto-pick last used port when that port is not in detected ports list

master
Keegi 2011-06-07 18:11:45 +03:00
parent 5ea057779b
commit d39f34221d
1 changed files with 1 additions and 1 deletions

View File

@ -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):