~afb/smart/solaris

« back to all changes in this revision

Viewing changes to smart/interface.py

  • Committer: Anders F Bjorklund
  • Date: 2009-03-11 10:07:49 UTC
  • mfrom: (856.1.8 bugfix)
  • Revision ID: afb@users.sourceforge.net-20090311100749-g9n4xrouwqmbam8s
merge changes from trunk, via bugfix

Show diffs side-by-side

added added

removed removed

Lines of Context:
147
147
    try:
148
148
        x = fcntl.ioctl(1, termios.TIOCGWINSZ, s)
149
149
    except IOError:
150
 
        return 80
151
 
    width = struct.unpack('HHHH', x)[1]
152
 
    if width > 0:
153
 
        return width
 
150
        width = 80
154
151
    else:
155
 
        return 80
 
152
        width = struct.unpack('HHHH', x)[1]
 
153
        if width == 0:
 
154
            width = 80
 
155
    return width
 
156
 
156
157
 
157
158
def createInterface(name, ctrl, command=None, argv=None):
158
159
    try: