Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue7246] getpass raises IOError when several returns are in stdin before getpass was called

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Nov 1, 2009, 9:47 AM

Post #1 of 6 (239 views)
Permalink
[issue7246] getpass raises IOError when several returns are in stdin before getpass was called

Changes by Gregory P. Smith <greg [at] krypto>:


----------
assignee: -> gregory.p.smith
components: +Library (Lib)
nosy: +gregory.p.smith
priority: -> normal
title: getpass crashes when several returns are in stdin before getpass was called -> getpass raises IOError when several returns are in stdin before getpass was called
type: crash -> behavior

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7246>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 1, 2009, 9:52 AM

Post #2 of 6 (224 views)
Permalink
[issue7246] getpass raises IOError when several returns are in stdin before getpass was called [In reply to]

Gregory P. Smith <greg [at] krypto> added the comment:

am unable to duplicate this behavior on Linux or OS X using python 2.6.

What platform did you see the problem on?

that said, can you apply the following patch to your getpass.py and see if
it helps at all?

http://svn.python.org/view/python/trunk/Lib/getpass.py?
r1=74860&r2=76000&pathrev=76000

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7246>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 1, 2009, 9:54 AM

Post #3 of 6 (232 views)
Permalink
[issue7246] getpass raises IOError when several returns are in stdin before getpass was called [In reply to]

Gregory P. Smith <greg [at] krypto> added the comment:

ah i misread your example. the following works to reproduce it:


Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time, getpass
>>> time.sleep(5)
getpass.getpass()


>>> getpass.getpass()
Password: Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/getpass.py", line 81, in unix_getpass
stream.write('\n')
IOError: [Errno 29] Illegal seek

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7246>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 1, 2009, 9:55 AM

Post #4 of 6 (225 views)
Permalink
[issue7246] getpass raises IOError when several returns are in stdin before getpass was called [In reply to]

Gregory P. Smith <greg [at] krypto> added the comment:

and the r76000 patch does not fix it. investigating.

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7246>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 1, 2009, 10:31 AM

Post #5 of 6 (230 views)
Permalink
[issue7246] getpass raises IOError when several returns are in stdin before getpass was called [In reply to]

Gregory P. Smith <greg [at] krypto> added the comment:

change that. it looks like r76000 in trunk already fixes this. i was
using an old build when i tried earlier.

merged into release26-maint in r76015.

----------
resolution: -> fixed
status: open -> closed

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7246>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Nov 2, 2009, 2:21 AM

Post #6 of 6 (198 views)
Permalink
[issue7246] getpass raises IOError when several returns are in stdin before getpass was called [In reply to]

Avihu Turzion <avihu [at] turzion> added the comment:

Great. Thanks :)

----------

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue7246>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.