[PATCH 06/34] lsusb.py: ensure all error messages are written to stderr

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

 



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

diff --git a/lsusb.py.in b/lsusb.py.in
index b0964c1..e09b4cf 100644
--- a/lsusb.py.in
+++ b/lsusb.py.in
@@ -558,7 +558,7 @@ def main(argv):
 	try:
 		(optlist, args) = getopt.gnu_getopt(argv[1:], "hiIuUwcef:", ("help",))
 	except getopt.GetoptError as exc:
-		print("Error:", exc)
+		print("Error:", exc, file=sys.stderr)
 		sys.exit(2)
 	for opt in optlist:
 		if opt[0] == "-h" or opt[0] == "--help":
@@ -592,7 +592,7 @@ def main(argv):
 			showeps = True
 			continue
 	if len(args) > 0:
-		print("Error: excess args %s ..." % args[0])
+		print("Error: excess args %s ..." % args[0], file=sys.stderr)
 		sys.exit(2)
 
 	if usbids[0]:
-- 
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