New if-else statement is added to check if exit code of previous Popen call is == 0 . Statement is added to insights.client.utilities.print_egg_version method.
CARD ID: CCT-406
All Pull Requests:
Check all that apply:
[x] Have you followed the guidelines in our Contributing document, including the instructions about commit messages?
[x] Is this PR to correct an issue?
[ ] Is this PR an enhancement?
Complete Description of Additions/Changes:
Originally, when unimportable egg was encountered, Insights client logged part of the traceback to the DEBUG log. I added a functionality which checks exit code of corresponding subprocess calling import and egg and if the code is not == 0, then it results to message ""path/to/egg: Corrupted egg." I was not able to capture exception from subprocess, so I choose this approach by using exit status. There is space for discussion whether there could happen another scenarios other than unimportable corrupted egg. Non-existing egg is already handled in code before.
New if-else statement is added to check if exit code of previous Popen call is == 0 . Statement is added to insights.client.utilities.print_egg_version method.
CARD ID: CCT-406
All Pull Requests:
Check all that apply:
Complete Description of Additions/Changes:
Originally, when unimportable egg was encountered, Insights client logged part of the traceback to the DEBUG log. I added a functionality which checks exit code of corresponding subprocess calling import and egg and if the code is not == 0, then it results to message ""path/to/egg: Corrupted egg." I was not able to capture exception from subprocess, so I choose this approach by using exit status. There is space for discussion whether there could happen another scenarios other than unimportable corrupted egg. Non-existing egg is already handled in code before.