Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
return error info
  • Loading branch information
liufufa committed Mar 20, 2023
1 parent a5b0de4 commit 18f1a89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ def wechat():
# 把构造的字典转换成xml格式
xml = xmltodict.unparse({'xml':resp})
return xml
except:
except Exception as e:
resp = {
'ToUserName':req.get('FromUserName'),
'FromUserName':req.get('ToUserName'),
'CreateTime':int(time.time()),
'MsgType':'text',
'Content':'好像发生了点问题,请稍后再重新提问~'
'Content':'好像发生了点问题,请稍后再重新提问~'+str(e)
}
xml = xmltodict.unparse({'xml':resp})
return xml
Expand Down

0 comments on commit 18f1a89

Please sign in to comment.