def resove_conf(conf,fid,user,action): print conf,99999999999999999999999999999999999999999999999999999999,"开始解析" #conf= {} model="transfile_getfile_resove_conf" info={"msgtype":"ERR","content":""} try: id=conf["id"] dfile=conf["dfile"] sfile=conf["sfile"] username=conf["username"] password=conf["password"] ip=conf["ip"] port=conf["port"] try: su=conf["su"] except KeyError: su='N' try: supassword=conf["sudopassword"] except KeyError: supassword="" try: sudo=conf["sudo"] except KeyError: sudo="N" try: sudopassword=conf["password"] except KeyError: sudopassword="" loginmethod=conf["loginmethod"] try: keyfile=conf["keyfile"] except KeyError: keyfile="" print "解析wanle ",5555555555555555555555555,conf except Exception,e: print "报错",e,11111111111111111111111111111111111111111111 msg=str(e) log(model,msg) info["content"]=msg cache.set("info:%s" % (fid),info,360000) return error_linenumber.get_linen_umber_function_name()[1]
cache.set("info:%s"%(fid),info,360000) logline["result"]="ERR" info["msgtype"]="OK" info["status"]="ERR" logline["msg"]=msg print "抓取到异常...",e logline["result"]=msg cache_translog=cache.get("translog") if cache_translog: cache_translog.append(logline) else: translog.append(logline) cache_translog=translog cache.set("translog",cache_translog,3600000000) cache.set("info:%s"%(fid),info,600) return error_linenumber.get_linen_umber_function_name()[1] else: t.close() def resove_conf(conf,fid,user,action): print conf,99999999999999999999999999999999999999999999999999999999,"开始解析" model="transfile_getfile_resove_conf" info={"msgtype":"ERR","content":""} try: id=conf["id"] dfile=conf["dfile"] sfile=conf["sfile"] username=conf["username"] password=conf["password"] ip=conf["ip"] port=conf["port"] try:
cache.set("info:%s" % (fid), info, 360000) logline["result"] = "ERR" info["msgtype"] = "OK" info["status"] = "ERR" logline["msg"] = msg print "抓取到异常...", e logline["result"] = msg cache_translog = cache.get("translog") if cache_translog: cache_translog.append(logline) else: translog.append(logline) cache_translog = translog cache.set("translog", cache_translog, 3600000000) cache.set("info:%s" % (fid), info, 600) return error_linenumber.get_linen_umber_function_name()[1] else: t.close() def resove_conf(conf, fid, user, action): print conf, 99999999999999999999999999999999999999999999999999999999, "开始解析" model = "transfile_getfile_resove_conf" info = {"msgtype": "ERR", "content": ""} try: id = conf["id"] dfile = conf["dfile"] sfile = conf["sfile"] username = conf["username"] password = conf["password"] ip = conf["ip"]