mirror of
https://github.com/haiwen/libsearpc.git
synced 2025-09-02 13:25:25 +00:00
Fix bug when dict value is 0
This commit is contained in:
@@ -18,8 +18,10 @@ def _fret_int(ret_str):
|
|||||||
if dicts.has_key('err_code'):
|
if dicts.has_key('err_code'):
|
||||||
raise SearpcError(dicts['err_msg'])
|
raise SearpcError(dicts['err_msg'])
|
||||||
|
|
||||||
if dicts['ret']:
|
if dicts.has_key('ret'):
|
||||||
return dicts['ret']
|
return dicts['ret']
|
||||||
|
else:
|
||||||
|
raise SearpcError('Invalid response format')
|
||||||
|
|
||||||
def _fret_string(ret_str):
|
def _fret_string(ret_str):
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user