diff --git a/pysearpc/client.py b/pysearpc/client.py index 9333a5c..a57167d 100644 --- a/pysearpc/client.py +++ b/pysearpc/client.py @@ -17,9 +17,11 @@ def _fret_int(ret_str): if dicts.has_key('err_code'): raise SearpcError(dicts['err_msg']) - - if dicts['ret']: + + if dicts.has_key('ret'): return dicts['ret'] + else: + raise SearpcError('Invalid response format') def _fret_string(ret_str): try: