mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 15:21:25 -07:00
Prefer io.BytesIO over six; available on all supported Pythons (#45388)
On all supported Pythons, the io.BytesIO is always a stream implementation using an in-memory bytes buffer. Makes code slightly more forward compatible by reducing use of the six module.
This commit is contained in:
parent
371d9596f4
commit
ef67d4074b
3 changed files with 7 additions and 3 deletions
|
@ -18,6 +18,7 @@
|
|||
|
||||
import json
|
||||
import os
|
||||
from io import BytesIO
|
||||
|
||||
from ansible.module_utils.six.moves.urllib.error import HTTPError
|
||||
|
||||
|
@ -28,7 +29,7 @@ from ansible.errors import AnsibleConnectionFailure
|
|||
from ansible.module_utils.connection import ConnectionError
|
||||
from ansible.module_utils.network.ftd.common import HTTPMethod, ResponseParams
|
||||
from ansible.module_utils.network.ftd.fdm_swagger_client import SpecProp, FdmSwaggerParser
|
||||
from ansible.module_utils.six import BytesIO, PY3, StringIO
|
||||
from ansible.module_utils.six import PY3, StringIO
|
||||
from ansible.plugins.httpapi.ftd import HttpApi
|
||||
|
||||
if PY3:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue