#NEWLINE# @ inlineCallbacks #NEWLINE# def onJoin( self , details ) : #NEWLINE# #INDENT# print ( 'session attached' ) #NEWLINE# results = [ ] #NEWLINE# svc1 = MyService1 ( ) #NEWLINE# res = ( yield self . register ( svc1 ) ) #NEWLINE# results . extend ( res ) #NEWLINE# res = ( yield self . register ( self ) ) #NEWLINE# results . extend ( res ) #NEWLINE# for res in results : #NEWLINE# #INDENT# if isinstance ( res , Failure ) : #NEWLINE# #INDENT# print ( 'Failed to register procedure: {}' . format ( res . value ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'registration ID {}: {}' . format ( res . id , res . procedure ) )