[PATCH 17/34] lsusb.py: cosmetic - replace tuples-as-"immutable lists" with regular lists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Mantas Mikulėnas <grawity@xxxxxxxxx>
---
 lsusb.py.in | 39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/lsusb.py.in b/lsusb.py.in
index 73b4e67..f19401c 100644
--- a/lsusb.py.in
+++ b/lsusb.py.in
@@ -22,7 +22,12 @@ nohub = False
 showeps = False
 
 prefix = "/sys/bus/usb/devices/"
-usbids = ("@usbids@", "/usr/share/usb.ids", "/usr/share/libosinfo/usb.ids", "/usr/share/kcmusb/usb.ids", )
+usbids = [
+	"@usbids@",
+	"/usr/share/usb.ids",
+	"/usr/share/libosinfo/usb.ids",
+	"/usr/share/kcmusb/usb.ids",
+]
 
 esc = chr(27)
 norm = esc + "[0;0m"
@@ -145,20 +150,21 @@ def find_usb_class(cid, sid, pid):
 	return ""
 
 
-devlst = (	'host', 	# usb-storage
-		'video4linux/video', 	# uvcvideo et al.
-		'sound/card',	# snd-usb-audio 
-		'net/', 	# cdc_ether, ...
-		'input/input',	# usbhid
-		'usb:hiddev',	# usb hid
-		'bluetooth/hci',	# btusb
-		'ttyUSB',	# btusb
-		'tty/',		# cdc_acm
-		'usb:lp',	# usblp
-		#'usb/lp',	# usblp 
-		'usb/',		# hiddev, usblp
-		#'usbhid',	# hidraw
-	)
+devlst = [
+	'host',			# usb-storage
+	'video4linux/video',	# uvcvideo et al.
+	'sound/card',		# snd-usb-audio
+	'net/',			# cdc_ether, ...
+	'input/input',		# usbhid
+	'usb:hiddev',		# usb hid
+	'bluetooth/hci',	# btusb
+	'ttyUSB',		# btusb
+	'tty/',			# cdc_acm
+	'usb:lp',		# usblp
+	#'usb/lp',		# usblp
+	'usb/',			# hiddev, usblp
+	#'usbhid',		# hidraw
+]
 
 def find_storage(hostno):
 	"Return SCSI block dev names for host"
@@ -528,8 +534,7 @@ def main(argv):
 			print("Warning: option -w is no longer supported", file=sys.stderr)
 			continue
 		if opt[0] in {"-f", "--usbids-path"}:
-			#usbids = (opt[1], *usbids)
-			usbids = (opt[1],)
+			usbids = [opt[1]]
 			continue
 		if opt[0] in {"-e", "--endpoints"}:
 			showeps = True
-- 
2.21.0




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux