Interesting discovery from automatic tools (python code)

José Matos jaomatos at gmail.com
Thu Aug 11 16:55:47 UTC 2022


On Thu, 2022-08-11 at 17:07 +0200, Pavel Sanda wrote:
> It seems that subprocess.check_call is raising exception instead of
> returning non-zero,
> so I gave it except block.

What type of exception did you get?

I did not use the exceptions to understand the failure reasons.
The issue with the except is that it is a catch all option and so the
exception could be caused by faulty assumptions from us in the initial
code.

FWIW I admit that under certain scenarios that is the right option. In
this case I am using a defensive style instead of being exceptional
(pun intended):-D .

Other than that the code looks correct.
-- 
José Abílio


More information about the lyx-devel mailing list