[New-bugs-announce] [issue26801] Fix shutil.get_terminal_size() to catch AttributeError

Emanuel Barry report at bugs.python.org
Mon Apr 18 19:43:57 EDT 2016


New submission from Emanuel Barry:

`shutil.get_terminal_size()` will sometimes propagate `AttributeError: module <os> has not attribute 'get_terminal_size'` to the caller. The call checks for NameError, which makes no sense, so I guess it must be an oversight. Attached patch fixes it.

(diff was generated with git, I don't know if it works with Mercurial, but it's a trivial change anyway)

----------
components: Library (Lib)
files: get_terminal_size.diff
keywords: patch
messages: 263701
nosy: ebarry
priority: normal
severity: normal
stage: patch review
status: open
title: Fix shutil.get_terminal_size() to catch AttributeError
type: behavior
Added file: http://bugs.python.org/file42511/get_terminal_size.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26801>
_______________________________________


More information about the New-bugs-announce mailing list