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