Commit 7ce7777f authored by auke.klazema's avatar auke.klazema

renamed parameters

parent 4a2e6c82
......@@ -57,15 +57,15 @@ class PrologixGpibUsb(PortDevice):
if not self._rematch:
raise ValueError(port)
def _find_available_port(self, maxDeviceNum, port, portFormat, timeout, verbose):
while int(self._rematch.group(2)) < maxDeviceNum:
def _find_available_port(self, max_device_num, port, port_format, timeout, verbose):
while int(self._rematch.group(2)) < max_device_num:
if verbose:
print "trying ", port
try:
self._serialPort = serial.Serial(port, timeout=timeout)
break
except serial.SerialException:
port = self._rematch.group(1) + (portFormat % (int(self._rematch.group(2)) + 1))
port = self._rematch.group(1) + (port_format % (int(self._rematch.group(2)) + 1))
self._rematch = re.search("(/dev/tty.*[^0-9])([0-9]+$)", port)
if self._serialPort is None:
raise serial.SerialException("Cannot find port")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment