Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 094f85549 -> a22095b48
sqlline.py doesn't propagate return code from Java process (Josh Elser) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/a22095b4 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/a22095b4 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/a22095b4 Branch: refs/heads/4.x-HBase-1.0 Commit: a22095b48ba462faedb08cfd675045f1e09f70d8 Parents: 094f855 Author: Samarth <[email protected]> Authored: Thu Oct 15 11:34:03 2015 -0700 Committer: Samarth <[email protected]> Committed: Thu Oct 15 11:34:03 2015 -0700 ---------------------------------------------------------------------- bin/phoenix_sandbox.py | 3 +++ bin/sqlline.py | 4 ++++ 2 files changed, 7 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/a22095b4/bin/phoenix_sandbox.py ---------------------------------------------------------------------- diff --git a/bin/phoenix_sandbox.py b/bin/phoenix_sandbox.py index c4fb841..7523ef7 100755 --- a/bin/phoenix_sandbox.py +++ b/bin/phoenix_sandbox.py @@ -57,3 +57,6 @@ except KeyboardInterrupt: proc.wait() print "Sandbox is stopped" +returncode = proc.returncode +if returncode is not None: + sys.exit(returncode) http://git-wip-us.apache.org/repos/asf/phoenix/blob/a22095b4/bin/sqlline.py ---------------------------------------------------------------------- diff --git a/bin/sqlline.py b/bin/sqlline.py index 80b5ff7..c61b205 100755 --- a/bin/sqlline.py +++ b/bin/sqlline.py @@ -64,4 +64,8 @@ java_cmd = 'java -cp "' + phoenix_utils.hbase_conf_dir + os.pathsep + phoenix_ut childProc = subprocess.Popen(java_cmd, shell=True) #Wait for child process exit (output, error) = childProc.communicate() +returncode = childProc.returncode childProc = None +# Propagate Java return code to this script +if returncode is not None: + sys.exit(returncode)
