Except "AttributeError" instead of "ImportError"
@@ -25,7 +25,7 @@ TERMINAL_WIDTH = 0
if IS_TTY:
try:
TERMINAL_WIDTH = os.get_terminal_size().columns
- except ImportError:
+ except AttributeError:
if not IS_WINDOWS:
terminal_size = os.popen('stty size', 'r').read().split()
if len(terminal_size) == 2:
