I was concerned about that too. After reading the python docs more closely, you can capture the return code.
In the patch for PHOENIX-1770, it captures the exit code of the Java command and exits with the same code. Mark -----Original Message----- From: Nick Dimiduk [mailto:ndimi...@gmail.com] Sent: March-24-15 10:38 AM To: dev@phoenix.apache.org Subject: Re: psql.py - subprocess.call vs subprocess.check_call How will using check_call instead of call impact keyboard interrups and stout/stderr handling of the child process? On Tuesday, March 24, 2015, Mark Tse <mark....@d2l.com> wrote: > FYI added https://issues.apache.org/jira/browse/PHOENIX-1770 > > Mark > > -----Original Message----- > From: Mark Tse [mailto:mark....@d2l.com <javascript:;>] > Sent: March-23-15 10:11 AM > To: dev@phoenix.apache.org <javascript:;> > Subject: psql.py - subprocess.call vs subprocess.check_call > > Hi there, > > I'm assuming the purpose of psql.py is to call it via a terminal so > that it can be incorporated into a script. > > If my assumption is correct, is there a reason we do: > subprocess.call(java_cmd, shell=True) > > instead of: > subprocess.check_call (java_cmd, shell=True) > > Code in question: > https://github.com/apache/phoenix/blob/master/bin/psql.py#L42 > > Thanks, > Mark > >