diff --git a/CHANGES b/CHANGES index c7d9bb2be..97d5b3789 100644 --- a/CHANGES +++ b/CHANGES @@ -11,6 +11,7 @@ Version 6.8 - Disabled sys._getframes() on Python interpreters that don't support it. See #728. - Fix bug in test runner when calling ``sys.exit`` with ``None``. See #739. +- Fix crash on Windows console, see #744. Version 6.7 ----------- diff --git a/click/_winconsole.py b/click/_winconsole.py index 9aed94216..f1d5e28ca 100644 --- a/click/_winconsole.py +++ b/click/_winconsole.py @@ -261,7 +261,7 @@ def _get_windows_console_stream(f, encoding, errors): func = _stream_factories.get(f.fileno()) if func is not None: if not PY2: - f = getattr(f, 'buffer') + f = getattr(f, 'buffer', None) if f is None: return None else: