#NEWLINE# def get_message( self , command = None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( ( command is not None ) and self . _Messages [ command ] ) : #NEWLINE# #INDENT# _msg = __import__ ( self . _Messages [ command ] , globals ( ) , locals ( ) , [ command ] ) #NEWLINE# _Message = getattr ( _msg , command ) #NEWLINE# if ( self . _connection . auth_token != b'' ) : #NEWLINE# #INDENT# token = self . _connection . auth_token #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# token = self . _auth_token #NEWLINE# #UNINDENT# message_instance = _Message ( self . _connection ) . set_session_token ( token ) #NEWLINE# message_instance . _push_callback = self . _push_received #NEWLINE# return message_instance #NEWLINE# #UNINDENT# #UNINDENT# except KeyError as e : #NEWLINE# #INDENT# self . _connection . close ( ) #NEWLINE# raise PyOrientBadMethodCallException ( ( 'Unable to find command ' + str ( e ) ) , [ ] )