def GET(self): try: sc = SystCtrl() rslt = sc.deploy() if rslt['result'] == 'ok': return 'SUCC' else: return rslt except Exception, e: return e
def GET(self): try: sc = SystCtrl() rslt = sc.deploy() if rslt["result"] == "ok": return "SUCC" else: return rslt except Exception, e: return e
def GET(self): try: sc = SystCtrl() result = sc.deploy() print 'deploy: %s' % result """ {'result': 'ok'} """ if "result" in result.keys(): return 'SUCC' else: return result['error'] except Exception, e: print " sc.deploy executete error, " return '命令执行错误'