summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pbr/tests/util.py2
-rw-r--r--pbr/util.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/pbr/tests/util.py b/pbr/tests/util.py
index de5a740..e847746 100644
--- a/pbr/tests/util.py
+++ b/pbr/tests/util.py
@@ -51,7 +51,7 @@ except ImportError:
@contextlib.contextmanager
def open_config(filename):
- cfg = configparser.ConfigParser()
+ cfg = configparser.SafeConfigParser()
cfg.read(filename)
yield cfg
with open(filename, 'w') as fp:
diff --git a/pbr/util.py b/pbr/util.py
index c7d3402..63566eb 100644
--- a/pbr/util.py
+++ b/pbr/util.py
@@ -201,7 +201,7 @@ def cfg_to_args(path='setup.cfg'):
"""
# The method source code really starts here.
- parser = configparser.RawConfigParser()
+ parser = configparser.SafeConfigParser()
if not os.path.exists(path):
raise DistutilsFileError("file '%s' does not exist" %
os.path.abspath(path))