Skip to content

Commit

Permalink
Cleaned up some code in _openWirelessBridgeOnWindows.
Browse files Browse the repository at this point in the history
  • Loading branch information
davelopez01 committed Jan 8, 2015
1 parent f681f6b commit 48a9db5
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/LabJackPython.py
Original file line number Diff line number Diff line change
Expand Up @@ -1436,25 +1436,6 @@ def _openWirelessBridgeOnWindows(firstFound, pAddress, devNumber):
return handle
else:
raise LabJackException("Bridges don't have identifiers yet.")
if handleOnly:
raise LabJackException("Can't use handleOnly with an id.")

numDevices = skymoteLib.LJUSB_GetDevCount(deviceType)

for i in range(numDevices):
handle = openDev(i + 1, 0, devType)

try:
if handle <= 0:
raise NullHandleException()
device = _makeDeviceFromHandle(handle, deviceType)
except:
continue

if device.localId == pAddress or device.serialNumber == pAddress or device.ipAddress == pAddress:
return device
else:
device.close()

raise LabJackException(LJE_LABJACK_NOT_FOUND)

Expand Down

0 comments on commit 48a9db5

Please sign in to comment.