mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-03 04:34:24 -07:00
Renamed SafeConfigParser to ConfigParser in gce inventory script (#54974)
This commit is contained in:
parent
3f579eb68f
commit
c3e50db1d5
2 changed files with 4 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- rename safeConfigParser to ConfigParser to suppress DeprecationWarning (The SafeConfigParser class has been renamed to ConfigParser in Python 3.2.)
|
|
@ -184,7 +184,7 @@ class GceInventory(object):
|
||||||
"""
|
"""
|
||||||
Reads the settings from the gce.ini file.
|
Reads the settings from the gce.ini file.
|
||||||
|
|
||||||
Populates a SafeConfigParser object with defaults and
|
Populates a ConfigParser object with defaults and
|
||||||
attempts to read an .ini-style configuration from the filename
|
attempts to read an .ini-style configuration from the filename
|
||||||
specified in GCE_INI_PATH. If the environment variable is
|
specified in GCE_INI_PATH. If the environment variable is
|
||||||
not present, the filename defaults to gce.ini in the current
|
not present, the filename defaults to gce.ini in the current
|
||||||
|
@ -198,7 +198,7 @@ class GceInventory(object):
|
||||||
# This provides empty defaults to each key, so that environment
|
# This provides empty defaults to each key, so that environment
|
||||||
# variable configuration (as opposed to INI configuration) is able
|
# variable configuration (as opposed to INI configuration) is able
|
||||||
# to work.
|
# to work.
|
||||||
config = configparser.SafeConfigParser(defaults={
|
config = configparser.ConfigParser(defaults={
|
||||||
'gce_service_account_email_address': '',
|
'gce_service_account_email_address': '',
|
||||||
'gce_service_account_pem_file_path': '',
|
'gce_service_account_pem_file_path': '',
|
||||||
'gce_project_id': '',
|
'gce_project_id': '',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue