def keyring_auth(username=None, region=None, authenticate=True):
 if (not keyring):
  raise exc.KeyringModuleNotInstalled("The 'keyring' Python module is not installed on this system.")
 if (username is None):
  username = settings.get('keyring_username')
 if (not username):
  raise exc.KeyringUsernameMissing('No username specified for keyring authentication.')
 password = keyring.get_password('pyrax', username)
 if (password is None):
  raise exc.KeyringPasswordNotFound(("No password was found for the username '%s'." % username))
 set_credentials(username, password, region=region, authenticate=authenticate)

def keyring_auth ( username = None , region = None , authenticate = True ) : if ( not keyring ) : raise exc . KeyringModuleNotInstalled ( "The 'keyring' Python module is not installed on this system." ) if ( username is None ) : username = settings . get ( 'keyring_username' ) if ( not username ) : raise exc . KeyringUsernameMissing ( 'No username specified for keyring authentication.' ) password = keyring . get_password ( 'pyrax' , username ) if ( password is None ) : raise exc . KeyringPasswordNotFound ( ( "No password was found for the username '%s'." % username ) ) set_credentials ( username , password , region = region , authenticate = authenticate )
use the password stored within the keyring to authenticate .