|
From: | Matthias Meulien |
Subject: | bug#64406: [PATCH] Improve commands to manage Python imports |
Date: | Sun, 9 Jul 2023 08:32:09 +0200 |
Matthias Meulien <orontee@gmail.com> writes:
> Augusto Stoffel <arstoffel@gmail.com> writes:
>> (...)
>> This change implies that the "success" branch may run if the exit code
>> is nonzero (without knowing all the isort internals, it can't be
>> excluded that an exit code > 2 is used somewhere). I suggest instead a
>> (pcase status ...) to construct the " (maybe... ?)" segment of the error
>> message.
>
> Thanks, I'll fix this.
>> We could also take this opportunity to distinguish between random
>> exceptions happening in the script (which likely leads to exit code 1)
>> and the ModuleNotFoundError case.
>
> Good point, I'll improve this too.
Here are two patches.
The first one revert part of the original patch where I introduced a
useless detailed check of isort exit status itself.
The second one relates to your remarks: It shift the custom exit status
of the Python script and make sure that an error is reported assoon as
exit code >0.
[Prev in Thread] | Current Thread | [Next in Thread] |