X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=client%2FGoodFET.py;h=d97fb947e96d938fd0c6e4e218135d2f8c0f4de6;hp=b9c35e3adc4bad1f12b53103f85d30cadc12aba7;hb=6fa60e61ed4566a368eec48bcca567b5d45310e0;hpb=598bfb091e51a8d5b7e463bd834203d677d99977 diff --git a/client/GoodFET.py b/client/GoodFET.py index b9c35e3..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, @@ -195,6 +198,10 @@ class GoodFET: print "# DEBUG %s" % self.serialport.read(self.count) elif self.verb==0xFE: print "# DEBUG 0x%x" % struct.unpack(fmt[self.count-1], self.serialport.read(self.count))[0] + elif self.verb==0xFD: + #Do nothing, just wait so there's no timeout. + print "# NOP."; + sys.stdout.flush(); else: self.data=self.serialport.read(self.count);