INNER CODE UNIT · Python

get_or_else

arnonym/ha-plugins · ha-sip/src/call.py:39

    def get_or_else(name: Optional[str], default: CallHandling) -> CallHandling:
        try:
            return CallHandling[(name or '').upper()]
        except (KeyError, AttributeError):
            return default


class Call(pj.Call):
    def __init__(
        self,
        end_point: pj.Endpoint,
        sip_account: account.Account,
        call_id: str,
        uri_to_call: Optional[str],
        menu: Optional[MenuFromStdin],
        command_handler: CommandHandler,
        event_sender: EventSender,
        ha_config: ha.HaConfig,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…