Allow output redirection on Windows.

Closes #88.
This commit is contained in:
Jakub Roztocil committed 2012-09-21 04:30:59 +02:00
1 parent 4a6f32a0f4
commit a41dd7ac6d
3 files changed
+3 -17

No files matched your search

+1 -5
View File
@@ -96,10 +96,6 @@ class Parser(ArgumentParser):
self.env = env
if env.is_windows and not env.stdout_isatty:
self.error('Output redirection is not supported on Windows.'
' Please use `--output FILE\' instead.')
args = super(Parser, self).parse_args(args, namespace)
if not args.json and env.config.implicit_content_type == 'form':
@@ -244,7 +240,7 @@ class Parser(ArgumentParser):
if args.prettify == PRETTY_STDOUT_TTY_ONLY:
args.prettify = PRETTY_MAP['all' if env.stdout_isatty else 'none']
elif args.prettify and env.is_windows:
self.error('Only terminal output can be prettified on Windows.')
self.error('Only terminal output can be colorized on Windows.')
else:
args.prettify = PRETTY_MAP[args.prettify]