Conditions | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | from lib.wechatutil.wechatapp import WechatApplication |
||
4 | def getappinfo(id, factory): |
||
|
|||
5 | payload = {"agentid": id} |
||
6 | response = factory.get(apiUrl, payload) |
||
7 | if response['errcode'] != '0': |
||
8 | factory.refreshtoken(); |
||
9 | response = factory.get(apiUrl, payload) |
||
10 | if response['errcode'] == '0': |
||
11 | return 0, WechatApplication(response), None |
||
12 | else: |
||
13 | return int(response['errcode']), None, response['errmsg'] |
||
14 | |||
15 |
It is generally discouraged to redefine built-ins as this makes code very hard to read.