messages/_config.py
def retrieve_pwd_from_config(msg, cfg):
    """
    Retrieve auth from profile configuration and set in msg.auth attr.

    Args:
        :msg: (Message class) an instance of a message class.
        :cfg: (jsonconfig.Config) config instance.
    """
    msg_type = msg.__class__.__name__.lower()
    key_fmt = msg.profile + "_" + msg_type
    pwd = cfg.pwd[key_fmt].split(" :: ")
    if len(pwd) == 1:
        msg.auth = pwd[0]
    else:
        msg.auth = tuple(pwd)
def retrieve_pwd_from_config(msg, cfg):
    """
    Retrieve auth from profile configuration and set in msg.auth attr.

    Args:
        :msg: (Message class) an instance of a message class.
        :cfg: (jsonconfig.Config) config instance.
    """
    msg_type = msg.__class__.__name__.lower()
    key_fmt = msg.profile + "_" + msg_type
    pwd = cfg.pwd[key_fmt].split(" :: ")
    if len(pwd) == 1:
        msg.auth = pwd[0]
    else:
        msg.auth = tuple(pwd)
Retrieve auth from profile configuration and set in msg.auth attr.

    Args:
        :msg: (Message class) an instance of a message class.
        :cfg: (jsonconfig.Config) config instance.