pymensago/serverconn.py
def wrap_server_error(response) -> RetVal:
	'''Wraps a server response into a RetVal object'''
	out = RetVal(__errcode_map.get(response['Code'],ErrServerError), response.info())
	for key in ['Code', 'Status', 'Info', 'Data']:
		if key in response:
			out[key] = response[key]
	if not response.info() and 'Status' in response:
			out.set_info(response['Status'])
	return out
Wraps a server response into a RetVal object
Wraps a server response into a RetVal object
Wraps a server response into a RetVal object
def wrap_server_error(response) -> RetVal:
	out = RetVal(__errcode_map.get(response['Code'],ErrServerError), response.info())
	for key in ['Code', 'Status', 'Info', 'Data']:
		if key in response:
			out[key] = response[key]
	if not response.info() and 'Status' in response:
			out.set_info(response['Status'])
	return out
def wrap_server_error ( response ) -> RetVal : out = RetVal ( __errcode_map . get ( response [ 'Code' ] , ErrServerError ) , response . info ( ) ) for key in [ 'Code' , 'Status' , 'Info' , 'Data' ] : if key in response : out [ key ] = response [ key ] if not response . info ( ) and 'Status' in response : out . set_info ( response [ 'Status' ] ) return out
Wraps a server response into a RetVal object
Wraps a server response into a RetVal object
'''Wraps a server response into a RetVal object'''
response