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

Base64IO: set write buffer before doing attr check #1377

Closed
wants to merge 1 commit into from

Commits on Jun 24, 2024

  1. Base64IO: set write buffer before doing attr check

    TestBase64IO.test_init_fails() fails in current Fedora Rawhide
    (with Python 3.13) because pytest complains about an unraisable
    exception:
    
    AttributeError: 'Base64IO' object has no attribute '_Base64IO__write_buffer'
    
    it seems like we're reaching `close()` (via `__exit__()`, I
    guess) even after raising an exception in `__init__()`, and that
    causes a problem because we never set `self.__write_buffer` if
    the required attrs check fails.
    
    To solve this, we can just set `self.__write_buffer` before doing
    the attr check.
    
    Signed-off-by: Adam Williamson <[email protected]>
    AdamWill committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    855dc43 View commit details
    Browse the repository at this point in the history