#NEWLINE# def single( self , table , request , obj_id ) : #NEWLINE# #INDENT# if ( ( 'domain_context' not in request . session ) or ( request . session [ 'domain_context' ] != obj_id ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# domain = api . keystone . domain_get ( request , obj_id ) #NEWLINE# request . session [ 'domain_context' ] = obj_id #NEWLINE# request . session [ 'domain_context_name' ] = domain . name #NEWLINE# messages . success ( request , ( _ ( 'Domain Context updated to Domain %s.' ) % domain . name ) ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# messages . error ( request , _ ( 'Unable to set Domain Context.' ) )