From 652410b3337f1d44a015c48b1567a8a1d8e0a40b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Sat, 26 May 2012 15:28:28 +0530 Subject: [PATCH] basic update utility -- for complementing installs. Does pull, applies latest patches and sync --- update_erpnext.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/update_erpnext.py b/update_erpnext.py index 339b83374c..341fafda12 100644 --- a/update_erpnext.py +++ b/update_erpnext.py @@ -6,7 +6,7 @@ cmd_list = [ 'lib/wnf.py -l', 'lib/wnf.py --sync_all' ] - +err = 0 for cmd in cmd_list: stat, op = commands.getstatusoutput(cmd) if stat != 0: @@ -14,6 +14,10 @@ for cmd in cmd_list: print "cannot proceed with update" print "status: %s" % stat print "output: %s" % op + err = 1 break -print "update_erpnext.py --> run success." \ No newline at end of file +if not err: + print "update_erpnext.py --> run success." +else: + print "update_erpnext.py --> run failed." \ No newline at end of file