#NEWLINE# def _encryptAndSendCell( self , cell ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# enc = crypto . encryptCell ( cell , self . _crypt_path ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# msg = 'Error: {}. Failed to encrypt a {} cell on circuit {}. Refusing to send unencrypted cell. Dropping the cell.' . format ( e , type ( cell ) , self . circuit_id ) #NEWLINE# logging . warning ( msg ) #NEWLINE# return #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . _connection . send ( enc ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# msg = 'Error: {}. Failed to send an encrypted cell on circuit {}.' . format ( e , self . circuit_id ) #NEWLINE# logging . debug ( msg )