#NEWLINE# def connectionLost( self , reason ) : #NEWLINE# #INDENT# if self . _finished . called : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# body = self . _bodybuf . getvalue ( ) #NEWLINE# if reason . check ( ResponseDone ) : #NEWLINE# #INDENT# self . _finished . callback ( ( self . _txresponse , body , None ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if reason . check ( PotentialDataLoss ) : #NEWLINE# #INDENT# self . _finished . callback ( ( self . _txresponse , body , [ 'partial' ] ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _finished . errback ( reason )