Commit abfcfad6 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Use a non-zero exit code for neoctl when a command fails. This allow check the

command success from a shell script.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1275 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 86a7c851
......@@ -18,8 +18,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
import sys
from optparse import OptionParser
from neo.neoctl.app import Application
from neo import setupLog
parser = OptionParser()
......@@ -39,7 +39,11 @@ else:
handler = options.handler or "SocketConnector"
setupLog('NEOCTL', options.verbose)
from neo.neoctl.app import Application
app = Application(address, port, handler)
print app.execute(args)
result = app.execute(args)
if result is None:
print "failure"
sys.exit(1)
print result
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment