[DRAFT] Make ChecksumMismatch prettier, CLI and __str__ #27
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.
DRAFT for these reasons:
ChecksumMismatch#__str__
in its output)Change:
[checksum] Make ChecksumMismatch carry differences as a class parameter so that when things like the CLI render it, they can use that information.
[checksum] Make ChecksumMismatch implement
__str__
and give a pretter error. AWX currently uses str(exc) to render the errors, so this is a UX improvement there as well.[cli] Make the UI show these errors nicer as well. Now it will truncate the listing of files by default to avoid flooding the user's screen if they forgot (for example) to exclude their .git directory. A new flag, --no-truncate, is added to disable this truncation. Also, now the files are listed out in a readable way, one per line, rather than as a literal Python dictionary representation.
Test Plan:
__str__
outputSigned-off-by: Rick Elrod [email protected]