Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Dead code? #1

Open
hickst opened this issue Feb 26, 2022 · 1 comment
Open

Dead code? #1

hickst opened this issue Feb 26, 2022 · 1 comment

Comments

@hickst
Copy link

hickst commented Feb 26, 2022

Unless I misunderstand raise_for_status (and I might since I've never used it), this line will never be executed:

line 243

and this line will only be executed when the returned status is 200:

line 240

Both, as a result of the preceding raise_for_status:

line 238

@pothiers
Copy link
Member

Maybe so. I don't raise_for_status catches all kinds of errors. Maybe only client errors (4xx). I vaguely remember it missing server (5xx) status codes. Maybe.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants