Re: How to cover connection exception errors, and exit

2020-03-29 Thread Peter Otten
dcwhat...@gmail.com wrote: > Hi, > > I've tried urllib, requests, and some other options. But I haven't found > a way to trap certain urls that aren't possible to connect from, outside > the office. In those cases, I need to just output an error. > > > So, the following code will cover the 40

How to cover connection exception errors, and exit

2020-03-28 Thread dcwhatthe
Hi, I've tried urllib, requests, and some other options. But I haven't found a way to trap certain urls that aren't possible to connect from, outside the office. In those cases, I need to just output an error. So, the following code will cover the 404s and similar errors for most of the pro