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 valhallasw
Recipients valhallasw
Date 2011-02-17.20:56:27
SpamBayes Score 0.00027406012
Marked as misclassified No
Message-id <1297976188.87.0.766078134711.issue11236@psf.upfronthosting.co.za>
In-reply-to
Content
In python 2.5, entering ^C in a getpass prompt yields a KeyboardInterrupt. In later versions, nothing happens, and '\x03' is returned after pressing return.
In python 2.5, entering ^Z in a getpass prompt suspends the process. In later versions, nothing happens, and '\x1a' is returned after pressing return.

Pressing ctrl-C or ctrl-Z multiple times returns '\x03'/'\x1a' multiple times.

Tested versions:
Python 2.5.4 (r254:67916, Jan 20 2010, 21:44:03) [GCC 4.3.3] on linux2 (OK)
  getpass.py is http://svn.python.org/view/python/trunk/Lib/getpass.py?revision=43495&view=markup
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 (BAD)
  getpass.py is r76000 with the following diff:
54c54
<         except (AttributeError, ValueError):
---
>         except:
 (so it doesn't implement r74860)
Python 2.7.1 (r271:86832, Jan  4 2011, 13:57:14) [GCC 4.5.2] on sunos5 (BAD)
Python 3.1.2 (r312:79147, Sep 27 2010, 09:45:41) [GCC 4.4.3] on linux2 (BAD)
Python 3.1.3 (r313:86834, Dec  1 2010, 20:16:39) [GCC 4.5.1] on sunos5 (BAD)

Steps to reproduce:
1) import getpass
2) getpass.getpass('-> ')
3) press ctrl-C or ctrl-Z
- nothing happens
4) press return
- '\x03'/'\x1a' is returned
History
Date User Action Args
2011-02-17 20:56:28valhallaswsetrecipients: + valhallasw
2011-02-17 20:56:28valhallaswsetmessageid: <1297976188.87.0.766078134711.issue11236@psf.upfronthosting.co.za>
2011-02-17 20:56:28valhallaswlinkissue11236 messages
2011-02-17 20:56:28valhallaswcreate