#NEWLINE# def __call_stream( self , uri , params = None , method = 'get' ) : #NEWLINE# #INDENT# 'Returns an stream response\n        ' #NEWLINE# try : #NEWLINE# #INDENT# resp = self . __get_response ( uri , params , method , True ) #NEWLINE# assert resp . ok #NEWLINE# #UNINDENT# except AssertionError : #NEWLINE# #INDENT# raise BadRequest ( resp . status_code ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# log . error ( 'Bad response: {}' . format ( e ) , exc_info = True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return resp