diff scpisock.py @ 28:c6be52360c2f

Handle default port better so passing None in picks the default.
author Daniel O'Connor <darius@dons.net.au>
date Wed, 21 Sep 2011 14:56:55 +0930
parents ef713fe03db8
children b6ebe05f250f
line wrap: on
line diff
--- a/scpisock.py	Wed Sep 21 14:56:21 2011 +0930
+++ b/scpisock.py	Wed Sep 21 14:56:55 2011 +0930
@@ -36,7 +36,9 @@
 SCPI_PORT = 5025
 
 class SCPISockDevice(object):
-    def __init__(self, host, port = SCPI_PORT):
+    def __init__(self, host, port = None):
+        if port == None:
+            port = SCPI_PORT
         self.sock = socket.create_connection((host, port))
 
     def flush(self):