Log a warning when aqtinstall falls back to an external 7z extraction tool #705
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Inspired by #696 (comment). That comment suggested a place to add a log message, but I was unable to log the message there without disregarding the user’s selected log settings, which are not available until the
Cli
object is built.When
aqtinstall
fails to load thepy7zr
module, it falls back to whatever 7z extraction tool the user has specified in thesettings.ini
file, without notifying the user. This PR adds the following log message when that happens:This PR also does a little refactoring of the
Cli._set_sevenzip
method to improve readability.Side effect
There was an existing bug here, where the
install-qt
subcommand (but none of the other commands) would ignore the7zcmd
parameter in thesettings.ini
file, and use the hardcoded"7z"
instead. I'm pretty sure this was a bug; if not I can change it back.aqtinstall/aqt/installer.py
Lines 361 to 363 in 72da54f