mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
python3 compatiblity
remove use of basestring deal with configparser
This commit is contained in:
parent
943e4d37f5
commit
5b11494437
5 changed files with 13 additions and 7 deletions
|
@ -60,8 +60,9 @@ import socket
|
|||
import random
|
||||
import time
|
||||
import codecs
|
||||
import ConfigParser
|
||||
import uuid
|
||||
from ansible.compat.six.moves import configparser
|
||||
|
||||
try:
|
||||
import certifi
|
||||
HAS_CERTIFI = True
|
||||
|
@ -212,7 +213,7 @@ class CallbackModule(CallbackBase):
|
|||
'Disabling the Logentries callback plugin.')
|
||||
|
||||
config_path = os.path.abspath(os.path.dirname(__file__))
|
||||
config = ConfigParser.ConfigParser()
|
||||
config = configparser.ConfigParser()
|
||||
try:
|
||||
config.readfp(open(os.path.join(config_path, 'logentries.ini')))
|
||||
if config.has_option('logentries', 'api'):
|
||||
|
|
|
@ -79,7 +79,7 @@ class Connection(ConnectionBase):
|
|||
|
||||
p = subprocess.Popen(
|
||||
cmd,
|
||||
shell=isinstance(cmd, basestring),
|
||||
shell=isinstance(cmd, (text_type, binary_type)),
|
||||
executable=executable, #cwd=...
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue