(podcast)
Tries to subscribe to the given podcast at its hub
Tries to subscribe to the given podcast at its hub
Tries to subscribe to the given podcast at its hub
def subscribe_at_hub(podcast):
    """Tries to subscribe to the given podcast at its hub"""

    if not podcast.hub:
        return

    base_url = settings.DEFAULT_BASE_URL

    if not base_url:
        logger.warning(
            "Could not subscribe to podcast {podcast} "
            "at hub {hub} because DEFAULT_BASE_URL is not "
            "set.".format(podcast=podcast, hub=podcast.hub)
        )
        return

    logger.info(
        "subscribing to {podcast} at {hub}.".format(podcast=podcast, hub=podcast.hub)
    )
    utils.subscribe(podcast, podcast.url, podcast.hub, base_url)
def subscribe_at_hub ( podcast ) : if not podcast . hub : return base_url = settings . DEFAULT_BASE_URL if not base_url : logger . warning ( "Could not subscribe to podcast {podcast} " "at hub {hub} because DEFAULT_BASE_URL is not " "set." . format ( podcast = podcast , hub = podcast . hub ) ) return logger . info ( "subscribing to {podcast} at {hub}." . format ( podcast = podcast , hub = podcast . hub ) ) utils . subscribe ( podcast , podcast . url , podcast . hub , base_url )