Skip to content
This repository was archived by the owner on Feb 2, 2026. It is now read-only.

Commit d5ddd0a

Browse files
committed
Handle single address
1 parent 689e84c commit d5ddd0a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vxi11/vxi11.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,11 @@ def send_command(self, data):
827827
def create_setup(self, address_list):
828828
data = bytearray([self._bus_address | GPIB_CMD_TAD, GPIB_CMD_UNL])
829829

830+
if type(address_list) is int:
831+
address_list = [address_list]
832+
830833
for addr in address_list:
831-
if type(addr) == tuple:
834+
if type(addr) is tuple:
832835
if addr[0] < 0 or addr[0] > 30:
833836
raise Vxi11Exception("Invalid address", 'create_setup')
834837
data.append(addr[0] | GPIB_CMD_LAD)

0 commit comments

Comments
 (0)