From 80adba1cb4b07f6d182c907b5c5f796eb7b6b93d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 14 Dec 2015 05:31:46 -0500 Subject: Use SafeConfigParser in PyPIConfig file. Allows percent signs to be specified using two percent signs. Fixes #442. --- setuptools/package_index.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setuptools/package_index.py') diff --git a/setuptools/package_index.py b/setuptools/package_index.py index a26b58bc..322f9a61 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -945,14 +945,14 @@ class Credential(object): def __str__(self): return '%(username)s:%(password)s' % vars(self) -class PyPIConfig(configparser.ConfigParser): +class PyPIConfig(configparser.SafeConfigParser): def __init__(self): """ Load from ~/.pypirc """ defaults = dict.fromkeys(['username', 'password', 'repository'], '') - configparser.ConfigParser.__init__(self, defaults) + configparser.SafeConfigParser.__init__(self, defaults) rc = os.path.join(os.path.expanduser('~'), '.pypirc') if os.path.exists(rc): -- cgit v1.2.1