def _log_error_and_abort(ret, obj):
 ret['result'] = False
 ret['abort'] = True
 if ('error' in obj):
  ret['comment'] = '{0}'.format(obj.get('error'))
 return ret

def _log_error_and_abort ( ret , obj ) : ret [ 'result' ] = False ret [ 'abort' ] = True if ( 'error' in obj ) : ret [ 'comment' ] = '{0}' . format ( obj . get ( 'error' ) ) return ret
helper function to update errors in the return structure .