Commit 30f7561
authored
pyopenssl_context.py: Fix incorrect service_identity error names
When there is a mistake in the certificates configuration, PyMongo would give the following error:
```
pymongo.errors.ServerSelectionTimeoutError: module service_identity has no attribute SICertificateError, Timeout: 30s, Topology Description: <…>
```
Because the `except` block expected non-existing errors, the error gets transformed to "module … has no attribute …".
The errors in the `service_identity` have never had the `SI` prefix:
https://github.com/pyca/service-identity/blob/18.1.0/src/service_identity/exceptions.py
It looks like the errors were imported with an alias before, but this aliasing was (only partially) removed when rewriting to lazy imports in this commit:
42a08c4#diff-b277a2f4cfbb5decab333d0b90a08a4ad64b91fb1691ed8412b15949d1aaceee
The lazy imports were removed again in this commit, but the error remained:
49987e6#diff-b277a2f4cfbb5decab333d0b90a08a4ad64b91fb1691ed8412b15949d1aaceee
Most likely, the `# type: ignore[misc]` comment can now also be removed.1 parent 54846cd commit 30f7561
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
0 commit comments