2012-05-26 09:47:38 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
import commands
|
|
|
|
|
|
|
|
cmd_list = [
|
|
|
|
'lib/wnf.py --pull origin master',
|
|
|
|
'lib/wnf.py -l',
|
|
|
|
'lib/wnf.py --sync_all'
|
|
|
|
]
|
2012-05-26 09:58:28 +00:00
|
|
|
err = 0
|
2012-05-26 09:47:38 +00:00
|
|
|
for cmd in cmd_list:
|
|
|
|
stat, op = commands.getstatusoutput(cmd)
|
|
|
|
if stat != 0:
|
|
|
|
print "something went wrong"
|
|
|
|
print "cannot proceed with update"
|
|
|
|
print "status: %s" % stat
|
|
|
|
print "output: %s" % op
|
2012-05-26 09:58:28 +00:00
|
|
|
err = 1
|
2012-05-26 09:57:28 +00:00
|
|
|
break
|
|
|
|
|
2012-05-26 09:58:28 +00:00
|
|
|
if not err:
|
|
|
|
print "update_erpnext.py --> run success."
|
|
|
|
else:
|
|
|
|
print "update_erpnext.py --> run failed."
|