Serhiy Storchaka added the comment: > What platform do you get the AttributeError with? Perhaps the function is not > well covered in the test suite.
I guess `os.get_terminal_size()` didn't exist on ancient OSes like DOS, OS/2, ancient UNIXes. On all supported platforms (including such exotic as old AIX, QNX or Minix) it should be defined. Tests should fail if `os.get_terminal_size()` doesn't exist. > I think Rietveld doesn't like me because I made it a .diff file, and not a > .patch file, but who knows. I think this is because the patch doesn't contain a revision number. On Windows `os.get_terminal_size()` can raise ValueError if `sys.__stdout__.fileno()` is not one of 0, 1 or 2. It is worth to catch it too. An AttributeError is also raised if sys.__stdout__ has no the "fileno" attribute (StringIO or None). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26801> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com