On Thu, 2022-08-11 at 20:29 +0200, Pavel Sanda wrote: > > 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. > > My understanding is that subprocess.check_call does not return > nonzero > to signal nonzero exit status of the called subroutine, but raises > exception. So the correct thing is to catch exception, not checking > return value of subprocess.check_call. (?) > > Pavel
You are right. :-) My point is that for the code to be correct we should catch the right exception: subprocess.CalledProcessError. This is valid even for python 2. Being practical your solution works so commit it. :-) -- José Abílio -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel