minor bug fix on parsing experiments data
[goodfet] / client / GoodFETMCPCANCommunication.py
index 6aee2ef..6af64ff 100644 (file)
@@ -237,8 +237,8 @@ class GoodFETMCPCANCommunication:
                 for byte in packet:
                     row.append("%02x"%ord(byte));
                 dataWriter.writerow(row);
-        
-        outfile.close()
+        if(writeToFile == True):
+            outfile.close()
         print "Listened for %d seconds, captured %d packets." %(duration,packetcount);
         return packetcount