-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I have a PyPI config file like this:
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password
[pypitest]
repository: https://testpypi.python.org/pypi
username: your_username
password: your_password
Now I would add a new server to the index:
Ini ini = new Ini();
ini.read(file);
ini.sections().get("distutils").put("index-servers", "test\npypi\npypitest")
ini.getSections().put("test", new HashMap<String, String>());
ini.write(file2);
the files will contains:
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password
[pypitest]
repository: https://testpypi.python.org/pypi
username: your_username
password: your_password
[test]
the new value of index-servers "test\npypi\npypitest" is replaced by interpolation with "\npypi\npypitest". The first row is removed.
Metadata
Metadata
Assignees
Labels
No labels