Berker Peksag <berker.pek...@gmail.com> added the comment:

I don't think distutils changes are correct.

    ('realm', self.DEFAULT_REALM)

'realm' is the config name and 'self.DEFAULT_REALM' is its default value. In 
the 'for key, default in ...:' loop,

1. It checks if it's already set in the config file
2. Sets its value to 'current' if it does
3. If it doesn't, uses self.DEFAULT_REALM

distutils sets default values for undefined options via 'finalize_options' 
methods and there is the following command in 
'PyPIRCCommand.finalize_options()' method:

    if self.realm is None:
        self.realm = self.DEFAULT_REALM

So unless there is a user set value for the 'realm' option (see the 'upload' 
and 'register' commands), 'self.realm' equals to 'self.DEFAULT_REALM'.

I'd remove the following code instead:

    realm = self.realm or self.DEFAULT_REALM

----------
nosy: +berker.peksag

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32155>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to