Message190471
| Author |
vajrasky |
| Recipients |
alex, nikratio, vajrasky |
| Date |
2013年06月02日.07:24:09 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1370157850.52.0.207799162507.issue18116@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I isolate the bug. It happens in these lines:
# Always try reading and writing directly on the tty first.
fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
tty = os.fdopen(fd, 'w+', 1)
So to produce the bug more specifically, you can try this python file:
# bugme2.py
import os
fd = os.open('/dev/tty', os.O_RDWR|os.O_NOCTTY)
os.fdopen(fd, 'w+', 1)
# end of bugme2.py
In Linux Fedora 18, I would get this error:
/home/sky/Code/python/programming_language/cpython/Lib/os.py:1025: ResourceWarning: unclosed file <_io.FileIO name=3 mode='rb+'>
return io.open(fd, *args, **kwargs)
Traceback (most recent call last):
File "/tmp/bugme2.py", line 4, in <module>
os.fdopen(fd, 'w+', 1)
File "/home/sky/Code/python/programming_language/cpython/Lib/os.py", line 1025, in fdopen
return io.open(fd, *args, **kwargs)
io.UnsupportedOperation: File or stream is not seekable. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年06月02日 07:24:10 | vajrasky | set | recipients:
+ vajrasky, alex, nikratio |
| 2013年06月02日 07:24:10 | vajrasky | set | messageid: <1370157850.52.0.207799162507.issue18116@psf.upfronthosting.co.za> |
| 2013年06月02日 07:24:10 | vajrasky | link | issue18116 messages |
| 2013年06月02日 07:24:09 | vajrasky | create |
|