From c66fbacf8b3095c6de264657362e403920edace2 Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Sun, 26 Jul 2015 10:51:01 +0200 Subject: Don't add duplicate "\n" when using sqlformat tool (fixes #191). --- CHANGES | 1 + bin/sqlformat | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 9e0b44b..859fce8 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,7 @@ Development version Bug Fixes * Fix a regression in get_alias() introduced in 0.1.15 (issue185). * Fix a bug in the splitter regarding DECLARE (issue193). +* sqlformat command line tool doesn't duplicat newlines anymore (issue191). Release 0.1.15 (Apr 15, 2015) diff --git a/bin/sqlformat b/bin/sqlformat index fcee452..cecbed9 100755 --- a/bin/sqlformat +++ b/bin/sqlformat @@ -77,7 +77,7 @@ def main(): data = sys.stdin.read() else: try: - data = '\n'.join(open(args[0]).readlines()) + data = ''.join(open(args[0]).readlines()) except OSError: err = sys.exc_info()[1] # Python 2.5 compatibility _error('Failed to read %s: %s' % (args[0], err), exit_=1) -- cgit v1.2.1