#NEWLINE# def get_proxy_credentials( self , meth , credentials ) : #NEWLINE# #INDENT# '\n        If special credentials are needed while executing `meth`, return\n        them, else return `credentials`.\n\n        meth: method\n            Method to be invoked.\n\n        credentials: :class:`Credentials`\n            Current credentials in effect.\n\n        ' #NEWLINE# try : #NEWLINE# #INDENT# proxy_role = meth . _rbac [ 1 ] #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# raise RoleError ( ( 'No RBAC for method %s' % meth ) ) #NEWLINE# #UNINDENT# if proxy_role : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# proxy_creds = self . credentials_map [ proxy_role ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# raise RoleError ( ( 'No credentials for proxy role %s' % proxy_role ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# proxy_creds . client_creds = credentials . client_creds #NEWLINE# return proxy_creds #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return credentials