]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)
authorbalmeida-nokia <83089745+balmeida-nokia@users.noreply.github.com>
Mon, 21 Aug 2023 11:39:06 +0000 (12:39 +0100)
committerGitHub <noreply@github.com>
Mon, 21 Aug 2023 11:39:06 +0000 (11:39 +0000)
commit37135d25e269ede92bc7da363bebfa574782e59a
treec95cf1b525e57084ae62573c4a2e3354d7cf449e
parent80bdebdd8593f007a2232ec04a7729bba6ebf12c
gh-107396: tarfiles: set self.exception before _init_read_gz() (GH-107485)

In the stack call of: _init_read_gz()
```
_read, tarfile.py:548
read, tarfile.py:526
_init_read_gz, tarfile.py:491
```
a try;except exists that uses `self.exception`, so it needs to be set before
calling _init_read_gz().
Lib/tarfile.py
Lib/test/test_tarfile.py
Misc/NEWS.d/next/Library/2023-07-31-07-36-24.gh-issue-107396.3_Kh6D.rst [new file with mode: 0644]