File tree 2 files changed +14
-8
lines changed
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1
1
21a22,23
2
2
> import asyncio
3
3
>
4
- 67c69
4
+ 64a67,70
5
+ > if not configuration.verify_ssl:
6
+ > ssl_context.check_hostname = False
7
+ > ssl_context.verify_mode = ssl.CERT_NONE
8
+ >
9
+ 67,68c73
5
10
< ssl_context=ssl_context,
11
+ < verify_ssl=configuration.verify_ssl
6
12
---
7
- > ssl_context=ssl_context if configuration.verify_ssl else None,
8
- 81a84,86
13
+ > ssl_context=ssl_context
14
+ 81a87,89
9
15
> def __del__(self):
10
16
> asyncio.ensure_future(self.pool_manager.close())
11
17
>
12
- 130a136,138
18
+ 130a139,141
13
19
> if headers['Content-Type'] == 'application/json-patch+json':
14
20
> if not isinstance(body, list):
15
21
> headers['Content-Type'] = 'application/strategic-merge-patch+json'
16
- 164c172,174
22
+ 164c175,177
17
23
< async with self.pool_manager.request(**args) as r:
18
24
---
19
25
> r = await self.pool_manager.request(**args)
20
26
> if _preload_content:
21
27
>
22
- 168,169c178,179
28
+ 168,169c181,182
23
29
< # log response body
24
30
< logger.debug("response body: %s", r.data)
25
31
---
26
32
> # log response body
27
33
> logger.debug("response body: %s", r.data)
28
- 171,172c181,182
34
+ 171,172c184,185
29
35
< if not 200 <= r.status <= 299:
30
36
< raise ApiException(http_resp=r)
31
37
---
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ if [ ${PACKAGE_NAME} == "client" ]; then
71
71
# workaround https://github.com/swagger-api/swagger-codegen/pull/8204
72
72
# + closing session
73
73
# + support application/strategic-merge-patch+json
74
- # workaround https://github.com/swagger-api/swagger-codegen/pull/8507
74
+ # workaround https://github.com/swagger-api/swagger-codegen/pull/8797
75
75
# + aiohttp without verify_ssl
76
76
patch " ${OUTPUT_DIR} /client/rest.py" " ${SCRIPT_ROOT} /python-asyncio-rest.py.patch"
77
77
You can’t perform that action at this time.
0 commit comments