summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/register.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/distutils/command/register.py')
-rw-r--r--Lib/distutils/command/register.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/Lib/distutils/command/register.py b/Lib/distutils/command/register.py
index 045cbb6..bd9b8c0 100644
--- a/Lib/distutils/command/register.py
+++ b/Lib/distutils/command/register.py
@@ -143,13 +143,14 @@ class register(PyPIRCCommand):
# get the user's login info
choices = '1 2 3 4'.split()
while choice not in choices:
- print('''We need to know who you are, so please choose either:
+ self.announce('''\
+We need to know who you are, so please choose either:
1. use your existing login,
2. register as a new user,
3. have the server generate a new password for you (and email it to you), or
4. quit
-Your selection [default 1]: ''', end=' ')
- choice = input()
+Your selection [default 1]: ''', log.INFO)
+ choice = raw_input()
if not choice:
choice = '1'
elif choice not in choices:
@@ -169,12 +170,16 @@ Your selection [default 1]: ''', end=' ')
# send the info to the server and report the result
code, result = self.post_to_server(self.build_post_data('submit'),
auth)
- print('Server response (%s): %s'%(code, result))
+ self.announce('Server response (%s): %s' % (code, result),
+ log.INFO)
# possibly save the login
if not self.has_config and code == 200:
- print('I can store your PyPI login so future submissions will be faster.')
- print('(the login will be stored in %s)' % self._get_rc_file())
+ self.announce(('I can store your PyPI login so future '
+ 'submissions will be faster.'), log.INFO)
+ self.announce('(the login will be stored in %s)' % \
+ self._get_rc_file(), log.INFO)
+
choice = 'X'
while choice.lower() not in 'yn':
choice = input('Save your login (y/N)?')