Fixed client error when GOODFET was undefined.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 3 Sep 2009 05:41:49 +0000 (05:41 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Thu, 3 Sep 2009 05:41:49 +0000 (05:41 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@110 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

client/GoodFET.py

index b335b4d..5a7ab02 100755 (executable)
@@ -17,7 +17,7 @@ class GoodFET:
     def serInit(self, port=None):
         """Open the serial port"""
         
     def serInit(self, port=None):
         """Open the serial port"""
         
-        if port is None:
+        if port is None and os.environ.get("GOODFET")!=None:
             glob_list = glob.glob(os.environ.get("GOODFET"));
             if len(glob_list) > 0:
                 port = glob_list[0];
             glob_list = glob.glob(os.environ.get("GOODFET"));
             if len(glob_list) > 0:
                 port = glob_list[0];