mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
Compatibility with six-1.3.0
This commit is contained in:
parent
30399edada
commit
c1039de70c
2 changed files with 7 additions and 7 deletions
|
@ -187,10 +187,10 @@ class Ec2Inventory(object):
|
|||
|
||||
def read_settings(self):
|
||||
''' Reads the settings from the ec2.ini file '''
|
||||
if six.PY2:
|
||||
config = configparser.SafeConfigParser()
|
||||
else:
|
||||
if six.PY3:
|
||||
config = configparser.ConfigParser()
|
||||
else:
|
||||
config = configparser.SafeConfigParser()
|
||||
ec2_default_ini_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'ec2.ini')
|
||||
ec2_ini_path = os.path.expanduser(os.path.expandvars(os.environ.get('EC2_INI_PATH', ec2_default_ini_path)))
|
||||
config.read(ec2_ini_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue