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.

classification
Title: subprocess.py strips last character when raising an AttributeError
Type: crash Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, mmokrejs
Priority: normal Keywords:

Created on 2008-06-29 09:17 by mmokrejs, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg68942 - (view) Author: Martin Mokrejs (mmokrejs) Date: 2008-06-29 09:17
I try to get working pipe emulation using Popen. I try to pass StringIO
object to p1.stdin of the first process and I got the following:

  File "/usr/lib/python2.5/subprocess.py", line 587, in __init__
    errread, errwrite) = self._get_handles(stdin, stdout, stderr)

  File "/usr/lib/python2.5/subprocess.py", line 932, in _get_handles
    p2cread = stdin.fileno()

AttributeError: 'cStringIO.StringI' object has no attribute 'fileno'

Aside from the fact I would hope that cStringIO could provide
self.fileno() I believe the error message should have been:

AttributeError: 'cStringIO.StringIO' object has no attribute 'fileno'
msg68951 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-06-29 13:56
No, the class you are creating with cStringIO.cStringIO is actually
called cStringIO.cStringI.
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47484
2008-06-29 13:56:29benjamin.petersonsetstatus: open -> closed
resolution: not a bug
messages: + msg68951
nosy: + benjamin.peterson
2008-06-29 09:17:24mmokrejscreate