'traces') with get_repo(project) as buck_repo: # If 'kill' is the second argument, shut down the buckd # process if sys.argv[1:] == ['kill']: buck_repo.kill_buckd() return 0 return buck_repo.launch_buck(build_id) finally: if tracing_dir: Tracing.write_to_dir(tracing_dir, build_id) if __name__ == "__main__": exit_code = 0 reporter = BuckStatusReporter(sys.argv) fn_exec = None try: setup_logging() exit_code = main(sys.argv, reporter) except ExecuteTarget as e: # this is raised once 'buck run' has the binary # it can get here only if exit_code of corresponding buck build is 0 fn_exec = e.execve except KeyboardInterrupt: reporter.status_message = 'Python wrapper keyboard interrupt' # Most shells set exit code to 128 + <Signal Number> # So, when catching SIGINT (2), we return 130 exit_code = 130 except Exception as e: logging.error(str(e))
with get_repo(project) as buck_repo: # If 'kill' is the second argument, shut down the buckd # process if sys.argv[1:] == ["kill"]: buck_repo.kill_buckd() return ExitCode.SUCCESS return buck_repo.launch_buck(build_id) finally: if tracing_dir: Tracing.write_to_dir(tracing_dir, build_id) _emit_java_version_warnings_if_any(java_version_status_queue) if __name__ == "__main__": exit_code = ExitCode.SUCCESS reporter = BuckStatusReporter(sys.argv) fn_exec = None exception = None try: setup_logging() exit_code = main(sys.argv, reporter) except ExecuteTarget as e: # this is raised once 'buck run' has the binary # it can get here only if exit_code of corresponding buck build is 0 fn_exec = e.execve except NoBuckConfigFoundException: exc_type, exception, exc_traceback = sys.exc_info() # buck is started outside project root exit_code = ExitCode.COMMANDLINE_ERROR except BuckDaemonErrorException: reporter.status_message = "Buck daemon disconnected unexpectedly"
'traces') with get_repo(project) as buck_repo: # If 'kill' is the second argument, shut down the buckd # process if sys.argv[1:] == ['kill']: buck_repo.kill_buckd() return 0 return buck_repo.launch_buck(build_id) finally: if tracing_dir: Tracing.write_to_dir(tracing_dir, build_id) if __name__ == "__main__": exit_code = 0 reporter = BuckStatusReporter(sys.argv) fn_exec = None exception = None try: setup_logging() exit_code = main(sys.argv, reporter) except ExecuteTarget as e: # this is raised once 'buck run' has the binary # it can get here only if exit_code of corresponding buck build is 0 fn_exec = e.execve except NoBuckConfigFoundException: exc_type, exception, exc_traceback = sys.exc_info() # buck is started outside project root exit_code = 3 # COMMANDLINE_ERROR except IOError as e: exc_type, exception, exc_traceback = sys.exc_info()