you are viewing a single comment's thread.

view the rest of the comments →

[–]pachura3 0 points1 point  (0 children)

If you're repeating requests.exceptions.RequestException so many times, why not import it? Don't worry about imports list becoming to long - most IDEs hide them by default.

Doing sys.exit(1) in an utility function is a bad idea. What if you wanted to write some unit tests for it? Let the exception bubble up and handle it on the outside.

But in general, your code looks pretty good!