Message293637
Thanks for the report, Tommy. I think the configparser exception is pretty descriptive here. You had a .pypirc file like the following:
[distutils]
index-servers =
pypi
global
[pypi]
username:spam
password:eggs
You passed -r global and you got:
Traceback (most recent call last):
...
ConfigParser.NoSectionError: No section: 'global'
Which says you don't have a section named 'global' in your .pypirc.
There are three options here:
a) do nothing
b) catch configparser.NoSectionError and raise a distutils exception with better wording. Since we don't have DistutilsConfigError, I'm not sure which one is more appropriate here.
c) ignore configparser.NoSectionError if server name cannot be found in sections in PyPIRCCommand._read_pypirc(). IMO this is the worst option.
Here is a test case to demonstrate the problem described at the SO question. |
|
Date |
User |
Action |
Args |
2017-05-14 06:33:07 | berker.peksag | set | recipients:
+ berker.peksag, eric.araujo, dstufft, Tommy Carpenter |
2017-05-14 06:33:07 | berker.peksag | set | messageid: <1494743587.22.0.567006973243.issue29895@psf.upfronthosting.co.za> |
2017-05-14 06:33:07 | berker.peksag | link | issue29895 messages |
2017-05-14 06:33:06 | berker.peksag | create | |
|