From f44b56ff3ad242edb14047c6474b1097345ed9e8 Mon Sep 17 00:00:00 2001 From: Felix Widmaier Date: Thu, 5 Oct 2017 09:55:57 +0200 Subject: [PATCH] rosnode: Return exit code 1 if there is an error. --- tools/rosnode/src/rosnode/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/rosnode/src/rosnode/__init__.py b/tools/rosnode/src/rosnode/__init__.py index 44917fb117..54dc0d3732 100644 --- a/tools/rosnode/src/rosnode/__init__.py +++ b/tools/rosnode/src/rosnode/__init__.py @@ -808,9 +808,12 @@ def rosnodemain(argv=None): _fullusage() except socket.error: print("Network communication failed. Most likely failed to communicate with master.", file=sys.stderr) + sys.exit(1) except rosgraph.MasterError as e: print("ERROR: "+str(e), file=sys.stderr) + sys.exit(1) except ROSNodeException as e: print("ERROR: "+str(e), file=sys.stderr) + sys.exit(1) except KeyboardInterrupt: pass