--- smart/interface.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) Index: smart-0.52/smart/interface.py =================================================================== --- smart-0.52.orig/smart/interface.py 2008-01-25 15:50:42.000000000 +0100 +++ smart-0.52/smart/interface.py 2008-01-25 15:51:10.000000000 +0100 @@ -148,7 +148,10 @@ x = fcntl.ioctl(1, termios.TIOCGWINSZ, s) except IOError: return 80 - return struct.unpack('HHHH', x)[1] + ret = struct.unpack('HHHH', x)[1] + if ret == 0: + return 80 + return ret def createInterface(name, ctrl, command=None, argv=None): try: