def catkin_failure(args, env={}): orig_environ = dict(os.environ) try: os.environ.update(env) catkin_main(args) except SystemExit as exc: ret = exc.code finally: os.environ = orig_environ return ret != 0
def catkin_success(args, env={}): orig_environ = dict(os.environ) try: os.environ.update(env) catkin_main(args) except SystemExit as exc: ret = exc.code if ret != 0: import traceback traceback.print_exc() finally: os.environ = orig_environ return ret == 0