This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author berker.peksag
Recipients Tommy Carpenter, berker.peksag, dstufft, eric.araujo
Date 2017-05-14.06:33:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494743587.22.0.567006973243.issue29895@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-05-14 06:33:07berker.peksagsetrecipients: + berker.peksag, eric.araujo, dstufft, Tommy Carpenter
2017-05-14 06:33:07berker.peksagsetmessageid: <1494743587.22.0.567006973243.issue29895@psf.upfronthosting.co.za>
2017-05-14 06:33:07berker.peksaglinkissue29895 messages
2017-05-14 06:33:06berker.peksagcreate