~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Vincent Ladeuil
  • Date: 2009-12-09 14:18:48 UTC
  • mto: (4881.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4882.
  • Revision ID: v.ladeuil+lp@free.fr-20091209141848-enx8tnsb84wwq2bl
Fix parameter order.

* bzrlib/osutils.py:
(_ioctl_terminal_size): bah, use the right order for height, width.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1398
1398
        import struct, fcntl, termios
1399
1399
        s = struct.pack('HHHH', 0, 0, 0, 0)
1400
1400
        x = fcntl.ioctl(1, termios.TIOCGWINSZ, s)
1401
 
        width, height = struct.unpack('HHHH', x)[0:2]
 
1401
        height, width = struct.unpack('HHHH', x)[0:2]
1402
1402
    except (IOError, AttributeError):
1403
1403
        pass
1404
1404
    return width, height