<s> from boto import provider <EOL> from functools import partial <EOL> from wal_e . exception import UserException <EOL> class InstanceProfileProvider ( provider . Provider ) : <EOL> """<STR_LIT>""" <EOL> def get_credentials ( self , access_key = None , secret_key = None , <EOL> security_token = None , profile_name = None ) : <EOL> if self . MetadataServiceSupport [ self . name ] : <EOL> self . _populate_keys_from_metadata_server ( ) <EOL> if not self . _secret_key : <EOL> raise UserException ( '<STR_LIT>' <EOL> '<STR_LIT>' , <EOL> hint = '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> Credentials = partial ( provider . Provider , "<STR_LIT>" ) <EOL> InstanceProfileCredentials = partial ( InstanceProfileProvider , '<STR_LIT>' ) </s>
