[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-25 Thread Isaac Levy

Isaac Levy added the comment:

I guess users need to check standard streams for None. There's not many uses of 
stream attributes in core libs.

Maybe catch should be Exception -- since it's documented to return a fallback 
on error.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24920
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24920] shutil.get_terminal_size throws AttributeError

2015-08-23 Thread Isaac Levy

New submission from Isaac Levy:

OS: windows 7, python 3.4.3, tk version 8.6.1

os.get_terminal_size also fails.


 shutil.get_terminal_size()
Traceback (most recent call last):
  File pyshell#4, line 1, in module
shutil.get_terminal_size()
  File C:\Python34\lib\shutil.py, line 1058, in get_terminal_size
size = os.get_terminal_size(sys.__stdout__.fileno())
AttributeError: 'NoneType' object has no attribute 'fileno'
 os.get_terminal_size()
Traceback (most recent call last):
  File pyshell#5, line 1, in module
os.get_terminal_size()
ValueError: bad file descriptor

--
components: IDLE
messages: 249039
nosy: Isaac Levy
priority: normal
severity: normal
status: open
title: shutil.get_terminal_size throws AttributeError
type: crash
versions: Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24920
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com