From c989249d0cd961bd65cffca316d46aea3f6b5354 Mon Sep 17 00:00:00 2001 From: Noah Morrison Date: Fri, 20 Jul 2018 19:58:35 -0400 Subject: [PATCH] Remove extra newline from cli The render function already handles adding a newline --- chevron/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chevron/main.py b/chevron/main.py index 1a7a8df..649e776 100755 --- a/chevron/main.py +++ b/chevron/main.py @@ -1,5 +1,7 @@ #!/usr/bin/python +import sys + try: import yaml as json except ImportError: # not tested @@ -78,7 +80,8 @@ def cli_main(): args = vars(parser.parse_args()) try: - print(main(**args)) + sys.stdout.write(main(**args)) + sys.stdout.flush() except SyntaxError as e: print('Chevron: syntax error') print(' ' + '\n '.join(e.args[0].split('\n'))) -- 2.47.3