# Path: resources/lib/PhoneBooks/pyicloud/exceptions.py
# class NoStoredPasswordAvailable(PyiCloudException):
#     pass


import getpass
from .exceptions import NoStoredPasswordAvailable


def get_password_from_keyring(username):
    result = None#keyring.get_password(
        #KEYRING_SYSTEM,
        #username
    #)
    if result is None:
        raise NoStoredPasswordAvailable(
            "No pyicloud password for {username} could be found "
            "in the system keychain.  Use the `--store-in-keyring` "
            "command-line option for storing a password for this "
            "username.".format(
                username=username,
            )
        )

    return result


def store_password_in_keyring(username, password):
    return keyring.set_password(
        KEYRING_SYSTEM,
        username,
        password,
    )


def delete_password_in_keyring(username):
    return keyring.delete_password(

# Path: resources/lib/PhoneBooks/pyicloud/exceptions.py
# class NoStoredPasswordAvailable(PyiCloudException):
#     pass


# Path: resources/lib/PhoneBooks/pyicloud/utils.py
import getpass
from .exceptions import NoStoredPasswordAvailable



def get_password_from_keyring(username):
    result = None#keyring.get_password(
        #KEYRING_SYSTEM,
        #username
    #)
    if result is None:
        raise NoStoredPasswordAvailable(
            "No pyicloud password for {username} could be found "
            "in the system keychain.  Use the `--store-in-keyring` "
            "command-line option for storing a password for this "
            "username.".format(
                username=username,
            )
        )

    return result


def store_password_in_keyring(username, password):
    return keyring.set_password(
        KEYRING_SYSTEM,
        username,
        password,
    )


def delete_password_in_keyring(username):
    return keyring.delete_password(

        KEYRING_SYSTEM,