Merge pull request #386 from honorabrutroll/dev

Fixed --pretty on Windows (closes #372)
This commit is contained in:
Jakub Roztočil 2016-01-01 18:15:50 -03:00
commit 2cdca36960
2 changed files with 3 additions and 1 deletions

View File

@ -33,3 +33,4 @@ Patches and ideas
* `Matthias Lehmann <https://github.com/matleh>`_
* `Dennis Brakhane <https://github.com/brakhane>`_
* `Matt Layman <https://github.com/mblayman>`_
* `Edward Yang <https://github.com/honorabrutroll>`_

View File

@ -378,7 +378,8 @@ class Parser(ArgumentParser):
if self.args.prettify == PRETTY_STDOUT_TTY_ONLY:
self.args.prettify = PRETTY_MAP[
'all' if self.env.stdout_isatty else 'none']
elif self.args.prettify and self.env.is_windows:
elif (self.args.prettify and self.env.is_windows and
self.args.output_file):
self.error('Only terminal output can be colorized on Windows.')
else:
# noinspection PyTypeChecker