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
shutil._make_tarball misses a guard against loggger=None #55254
Comments
This line : logger.info("creating %s" % archive_dir) should check that logger is not None before being called.. |
will fix + write patch |
Adding stacktrace to ticket |
Adding patch to ticket |
I’ve checked the code and this is the only place where logger.* is not protected by a check for None. There is no unit test, though. My patch adds two things: Make one formatting call lazy (use logging.info(one, two) instead of one % two), lower-case one message for consistent output). If we want to be ultra-conservative, Kelsey’s patch is to be preferred. |
Please apply right away. |
For 3.2, just make the one-line fix. I'm worry that a test may be hard to get right and would be a risk in and of itself this late in the release cycle. For the backports, a test would be nice (since we have time to fix a test if it turns out to be problematic). |
Indeed, I tried writing a small test to go into the faulty code path, but without calling the private function directly it’s not trivial. I’ll apply the minimal change shortly if there is no opposition from Georg. |
Fixed for 3.2rc2 in r88240. Would it be right to call the internal function in the test? |
Arg, bpo-9173 had a patch including a test. Not sure which bug is superseded by the other. |
This was fixed in 615a29295d5f. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: