[PATCH] bbremote: fix the exit usage

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

 



Unlike the sys.exit() function the builtin exit() function don't take an
argument. Fix it by using the exit function from the sys module which is
already imported.

Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
---
 scripts/remote/main.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/remote/main.py b/scripts/remote/main.py
index cef5d92ee2..37be5a35f0 100644
--- a/scripts/remote/main.py
+++ b/scripts/remote/main.py
@@ -14,7 +14,7 @@ try:
     import serial
 except:
     print("error: No python-serial package found", file=sys.stderr)
-    exit(2)
+    sys.exit(2)
 
 
 def versiontuple(v):
@@ -279,15 +279,15 @@ logging.basicConfig(level=VERBOSITY[args.verbose],
                     format='%(levelname)-8s %(module)-8s %(funcName)-16s %(message)s')
 try:
     res = args.func(args)
-    exit(res)
+    sys.exit(res)
 except RatpError as detail:
     print("Ratp error:", detail, file=sys.stderr);
-    exit(127)
+    sys.exit(127)
 except KeyboardInterrupt:
     print("\nInterrupted", file=sys.stderr);
-    exit(1)
+    sys.exit(1)
 #try:
 #    res = args.func(args)
 #except Exception as e:
 #    print("error: failed to establish connection: %s" % e, file=sys.stderr)
-#    exit(2)
+#    sys.exit(2)
-- 
2.29.2


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux