cli: no numbers for USB and Bluetooth devices
This commit is contained in:
parent
097736478d
commit
06209d238a
|
@ -89,7 +89,10 @@ def _print_device(dev, num=None):
|
||||||
print(' %s: Device not found' % num or dev.number)
|
print(' %s: Device not found' % num or dev.number)
|
||||||
return
|
return
|
||||||
|
|
||||||
print(' %d: %s' % (num or dev.number, dev.name))
|
if num or dev.number < 8:
|
||||||
|
print(' %d: %s' % (num or dev.number, dev.name))
|
||||||
|
else:
|
||||||
|
print('%s' % dev.name)
|
||||||
print(' Device path :', dev.path)
|
print(' Device path :', dev.path)
|
||||||
if dev.wpid:
|
if dev.wpid:
|
||||||
print(' WPID : %s' % dev.wpid)
|
print(' WPID : %s' % dev.wpid)
|
||||||
|
@ -290,7 +293,6 @@ def run(devices, args, find_receiver, find_device):
|
||||||
device_name = args.device.lower()
|
device_name = args.device.lower()
|
||||||
|
|
||||||
if device_name == 'all':
|
if device_name == 'all':
|
||||||
dev_num = 1
|
|
||||||
for d in devices:
|
for d in devices:
|
||||||
if isinstance(d, _receiver.Receiver):
|
if isinstance(d, _receiver.Receiver):
|
||||||
_print_receiver(d)
|
_print_receiver(d)
|
||||||
|
@ -298,17 +300,14 @@ def run(devices, args, find_receiver, find_device):
|
||||||
if count:
|
if count:
|
||||||
for dev in d:
|
for dev in d:
|
||||||
print('')
|
print('')
|
||||||
_print_device(dev)
|
_print_device(dev, dev.number)
|
||||||
count -= 1
|
count -= 1
|
||||||
if not count:
|
if not count:
|
||||||
break
|
break
|
||||||
print('')
|
print('')
|
||||||
else:
|
else:
|
||||||
if dev_num == 1:
|
|
||||||
print('USB and Bluetooth Devices')
|
|
||||||
print('')
|
print('')
|
||||||
_print_device(d, num=dev_num)
|
_print_device(d)
|
||||||
dev_num += 1
|
|
||||||
return
|
return
|
||||||
|
|
||||||
dev = find_receiver(devices, device_name)
|
dev = find_receiver(devices, device_name)
|
||||||
|
|
Loading…
Reference in New Issue