From 60910eff26f38c36574237ebbbe4c6f93998dee2 Mon Sep 17 00:00:00 2001 From: James Xu Date: Mon, 28 Jan 2019 15:21:26 -0800 Subject: [PATCH] fall back to default value if modules are not available (#199) * fcntl is not available on Windows, fall back to default value * nipick order --- tools/rosmake/src/rosmake/engine.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/rosmake/src/rosmake/engine.py b/tools/rosmake/src/rosmake/engine.py index 4d070473..a8fd49db 100644 --- a/tools/rosmake/src/rosmake/engine.py +++ b/tools/rosmake/src/rosmake/engine.py @@ -256,6 +256,8 @@ class Printer: s = struct.pack('HHHH', 0, 0, 0, 0) x = fcntl.ioctl(1, termios.TIOCGWINSZ, s) width = struct.unpack('HHHH', x)[1] + except ImportError: + pass except IOError: pass if width <= 0: