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
+2
-0
tools/rosmake/src/rosmake/engine.py
less
more
255
255
s = struct.pack('HHHH', 0, 0, 0, 0)
256
256
x = fcntl.ioctl(1, termios.TIOCGWINSZ, s)
257
257
width = struct.unpack('HHHH', x)[1]
258
except ImportError:
259
pass
258
260
except IOError:
259
261
pass
260
262
if width <= 0: