You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SOP/sop-sdk/sdk-python/response/BaseResponse.py

24 lines
463 B

4 years ago
#!/usr/bin/python
# -*- coding: UTF-8 -*-
from UserDict import UserDict
class BaseResponse(UserDict):
"""返回类"""
request_id = None
code = None
msg = None
sub_code = None
sub_msg = None
def __init__(self, _dict=None, **kwargs):
UserDict.__init__(self, _dict, **kwargs)
def is_success(self):
"""是否成功
:return: True,成功
:rtype: bool
"""
return self.sub_code is None