Codebase list ros-ros / 60910ef
fall back to default value if modules are not available (#199) * fcntl is not available on Windows, fall back to default value * nipick order James Xu authored 5 years ago Dirk Thomas committed 5 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
255255 s = struct.pack('HHHH', 0, 0, 0, 0)
256256 x = fcntl.ioctl(1, termios.TIOCGWINSZ, s)
257257 width = struct.unpack('HHHH', x)[1]
258 except ImportError:
259 pass
258260 except IOError:
259261 pass
260262 if width <= 0: