]> granicus.if.org Git - python/commitdiff
Don't try to get the window size if it was never set before.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 24 May 2008 09:36:45 +0000 (09:36 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 24 May 2008 09:36:45 +0000 (09:36 +0000)
Fixes the test failure on Solaris.

Lib/test/test_ioctl.py

index 9e6d4bcfbdc2df625b02b91a8c30158d8d9b2fb7..d46b10d5d97d2997ab5ac00d210ad744d82747b9 100644 (file)
@@ -52,13 +52,10 @@ class IoctlTests(unittest.TestCase):
                 set_winsz_opcode_maybe_neg, = struct.unpack("i",
                         struct.pack("I", termios.TIOCSWINSZ))
 
-            # We're just testing that these calls do not raise exceptions.
-            saved_winsz = fcntl.ioctl(mfd, termios.TIOCGWINSZ, "\0"*8)
             our_winsz = struct.pack("HHHH",80,25,0,0)
             # test both with a positive and potentially negative ioctl code
             new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_pos, our_winsz)
             new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, our_winsz)
-            fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, saved_winsz)
         finally:
             os.close(mfd)
             os.close(sfd)