On 2021-12-09 10:38:58 +0000, Chris Green wrote: > Julio Di Egidio <ju...@diegidio.name> wrote: > > Still your code wouldn't pass review: you do need some exception > > handling there [...] > However catching and re-trying isn't going to help at all. It happily > produced the same arror every 10 minutes throughout the night until I > rebooted the system.
I agree. Only catch exceptions which you can reasonably handle. For those which you can't handle (and "some part of my Python installation has just gone AWOL" is one of them) crashing with a stack trace is almost certainly your best option. > I suppose I *could* reboot after (say) three failures Maybe, but I wouldn't do that in the python program itself, but in a separate monitor process. > but it seems a bit drastic! :-) Yup. I'd do that only if I've run out of other options (which has happened in the past and probably will happen in the future). hp -- _ | Peter J. Holzer | Story must make more sense than reality. |_|_) | | | | | h...@hjp.at | -- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!"
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list