[PATCH 09/34] lsusb.py: use regular print() instead of hand-rolling the same thing

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

 



Even sys.stdout.write(str(usbdev)) would have been better.

Signed-off-by: Mantas Mikulėnas <grawity@xxxxxxxxx>
---
 lsusb.py.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lsusb.py.in b/lsusb.py.in
index 0d7ff95..93fe6b5 100644
--- a/lsusb.py.in
+++ b/lsusb.py.in
@@ -548,8 +548,7 @@ def read_usb():
 		root_hubs.append(usbdev)
 	root_hubs.sort(key=lambda x: int(x.fname[3:]))
 	for usbdev in root_hubs:
-		os.write(sys.stdout.fileno(), str.encode(usbdev.__str__()))
-		#print(usbdev.__str__())
+		print(usbdev, end="")
 
 def main(argv):
 	"main entry point"
-- 
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