"""ask_github.py - ask GitHub for one line of advice. It runs inside the sandbox.

    python3 ask_github.py
"""
import urllib.request

ADDRESS = "https://api.github.com/zen"


def main():
    try:
        with urllib.request.urlopen(ADDRESS, timeout=15) as reply:
            print("GitHub says:", reply.read().decode())
    except OSError as problem:
        print("could not connect:", problem)


if __name__ == "__main__":
    main()
