From: travisutk Date: Mon, 7 Jun 2010 18:43:24 +0000 (+0000) Subject: Fix for Windows NT machines with non-FTDI serial ports. X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=6fa60e61ed4566a368eec48bcca567b5d45310e0 Fix for Windows NT machines with non-FTDI serial ports. The new py2exe build should be published ASAP. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@607 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/client/GoodFET.py b/client/GoodFET.py index ab6ac30..d97fb94 100755 --- a/client/GoodFET.py +++ b/client/GoodFET.py @@ -93,10 +93,13 @@ class GoodFET: from scanwin32 import winScan; scan=winScan(); for order,comport,desc,hwid in sorted(scan.comports()): - if hwid.index('FTDI')==0: - port=comport; - #print "Using FTDI port %s" % port - + try: + if hwid.index('FTDI')==0: + port=comport; + #print "Using FTDI port %s" % port + except: + #Do nothing. + a=1; self.serialport = serial.Serial( port, diff --git a/client/goodfet.bsl b/client/goodfet.bsl index dc5fd87..949c431 100755 --- a/client/goodfet.bsl +++ b/client/goodfet.bsl @@ -1402,11 +1402,13 @@ def main(itest=1): from scanwin32 import winScan; scan=winScan(); for order,comport,desc,hwid in sorted(scan.comports()): - if hwid.index('FTDI')==0: - comPort=comport; - #print "Using FTDI port %s" % port - - + try: + if hwid.index('FTDI')==0: + comPort=comport; + #print "Using FTDI port %s" % port + except: + #Do nothing. + a=1; sys.stderr.write("MSP430 Bootstrap Loader Version: %s\n" % VERSION) try: