Allows for explicit port naming on NT.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sun, 24 Apr 2011 16:24:41 +0000 (16:24 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sun, 24 Apr 2011 16:24:41 +0000 (16:24 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1007 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFET.py

index b37b319..0d32cca 100755 (executable)
@@ -94,7 +94,7 @@ class GoodFET:
             glob_list = glob.glob("/dev/ttyU0");
             if len(glob_list) > 0:
                 port = glob_list[0];
             glob_list = glob.glob("/dev/ttyU0");
             if len(glob_list) > 0:
                 port = glob_list[0];
-        if os.name=='nt':
+        if port is None and os.name=='nt':
             from scanwin32 import winScan;
             scan=winScan();
             for order,comport,desc,hwid in sorted(scan.comports()):
             from scanwin32 import winScan;
             scan=winScan();
             for order,comport,desc,hwid in sorted(scan.comports()):