mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-19 06:40:21 -07:00
[PR #8185/9307b76e backport][stable-8] fix: Ensuring interpolation is disabled for ConfigParser (#8210)
fix: Ensuring interpolation is disabled for ConfigParser (#8185)
* fix: Ensuring interpolation is disabled for ConfigParser
This PR disables interpolation of ConfigParser and adds test coverage for that.
* Adding changelog fragment
* Fixing missing extension of changelog fragment
* Adding issue link to changelog fragment
* Update changelogs/fragments/8183-from_ini_to_ini.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9307b76e74
)
Co-authored-by: Steffen Scheib <37306894+sscheib@users.noreply.github.com>
This commit is contained in:
parent
39dd596e67
commit
66200a5da5
5 changed files with 19 additions and 4 deletions
|
@ -57,7 +57,7 @@ class IniParser(ConfigParser):
|
|||
''' Implements a configparser which is able to return a dict '''
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
super().__init__(interpolation=None)
|
||||
self.optionxform = str
|
||||
|
||||
def as_dict(self):
|
||||
|
|
|
@ -63,7 +63,7 @@ class IniParser(ConfigParser):
|
|||
''' Implements a configparser which sets the correct optionxform '''
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
super().__init__(interpolation=None)
|
||||
self.optionxform = str
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue