| |
@@ -1,39 +0,0 @@
|
| |
- From 7a611f4a140eb743281692cd296cb7256b4f2f7b Mon Sep 17 00:00:00 2001
|
| |
- From: Carl George <carl@george.computer>
|
| |
- Date: Wed, 15 Feb 2023 02:53:28 -0600
|
| |
- Subject: [PATCH 2/2] Restore compatibility with requests < 2.26.0
|
| |
-
|
| |
- InvalidJSONError was added in requests 2.26.0. RHEL 9 only has requests
|
| |
- 2.25.1. If we can't import it, define it ourselves.
|
| |
-
|
| |
- https://github.com/psf/requests/commit/05a1a21593c9c8e79393d35fae12c9c27a6f7605
|
| |
-
|
| |
- Signed-off-by: Carl George <carl@george.computer>
|
| |
- ---
|
| |
- fasjson_client/client.py | 10 +++++++++-
|
| |
- 1 file changed, 9 insertions(+), 1 deletion(-)
|
| |
-
|
| |
- diff --git a/fasjson_client/client.py b/fasjson_client/client.py
|
| |
- index a5e16f1..15f76c1 100644
|
| |
- --- a/fasjson_client/client.py
|
| |
- +++ b/fasjson_client/client.py
|
| |
- @@ -1,7 +1,15 @@
|
| |
- import errno
|
| |
- from urllib.parse import urljoin, urlsplit
|
| |
-
|
| |
- -from requests.exceptions import InvalidJSONError, RequestException
|
| |
- +from requests.exceptions import RequestException
|
| |
- +# InvalidJSONError was added in requests 2.26.0. RHEL 9 only has requests
|
| |
- +# 2.25.1. If we can't import it, define it ourselves.
|
| |
- +try:
|
| |
- + from requests.exceptions import InvalidJSONError
|
| |
- +except ImportError:
|
| |
- + class InvalidJSONError(RequestException):
|
| |
- + pass
|
| |
- +
|
| |
- from bravado import requests_client
|
| |
- from bravado.client import SwaggerClient, CallableOperation
|
| |
- from bravado.exception import HTTPError
|
| |
- --
|
| |
- 2.39.1
|
| |
-
|
| |