Display warning message via stderr or GUI.

def failure(path, downloader):
    """Display warning message via stderr or GUI."""
    base = os.path.basename(path)
    if sys.stdin.isatty():
        print('INFO [{}]: Failed to download {!r}'.format(downloader, base))
    else:
        notify_failure(base, downloader)