Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix example capture.py #171

Merged
merged 3 commits into from
Dec 21, 2023
Merged

Commits on Nov 25, 2023

  1. examples/capture.py: Handle OSError during os.read

    Symptom was:
    > # python3 ./examples/capture.py output.txt asciinema rec -c 'timeout 3 htop' output.cast
    > Traceback (most recent call last):
    >   File "[..]/examples/capture.py", line 39, in <module>
    >     data = os.read(master_fd, 1024)
    > OSError: [Errno 5] Input/output error
    >
    > # python3 --version
    > Python 3.10.13
    hartwork committed Nov 25, 2023
    Configuration menu
    Copy the full SHA
    7bce310 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. examples/capture.py: Resolve needless else

    .. to reduce nesting to simplify the structure.
    hartwork committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    8dcb37f View commit details
    Browse the repository at this point in the history
  2. examples/capture.py: Pass HOME environment variable (primarily)

    Symptom was:
    > # python3 ./examples/capture.py output.txt asciinema rec -c 'timeout 3 htop' output.cast
    > Traceback (most recent call last):
    >   File "/usr/lib/python-exec/python3.10/asciinema", line 8, in <module>
    >     sys.exit(main())
    >   File "/usr/lib/python3.10/site-packages/asciinema/__main__.py", line 61, in main
    >     cfg = config.load()
    >   File "/usr/lib/python3.10/site-packages/asciinema/config.py", line 226, in load
    >     config = Config(get_config_home(env), env)
    >   File "/usr/lib/python3.10/site-packages/asciinema/config.py", line 216, in get_config_home
    >     raise Exception(
    > Exception: need $HOME or $XDG_CONFIG_HOME or $ASCIINEMA_CONFIG_HOME
    hartwork committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    58d2189 View commit details
    Browse the repository at this point in the history