You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by td...@apache.org on 2015/11/10 02:18:23 UTC
[08/50] [abbrv] phoenix git commit: sqlline.py doesn't propagate
return code from Java process (Josh Elser)
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/f13b1680
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/f13b1680
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/f13b1680
Branch: refs/heads/txn
Commit: f13b16800351fa2e459aef5ce695506f5dc62099
Parents: d2a2d72
Author: Samarth <sa...@apache.org>
Authored: Thu Oct 15 11:32:28 2015 -0700
Committer: Samarth <sa...@apache.org>
Committed: Thu Oct 15 11:32:28 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/f13b1680/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/f13b1680/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)