From 94718efc35340349935906963c286464bc135eef Mon Sep 17 00:00:00 2001 From: laixintao Date: Sat, 18 Apr 2020 14:05:34 +0800 Subject: bugfix: don't echo a newline when output is empty. --- pgcli/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pgcli/main.py b/pgcli/main.py index 08c6c491..60cb6f8d 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -660,7 +660,8 @@ class PGCli(object): except IOError as e: click.secho(str(e), err=True, fg="red") else: - self.echo_via_pager("\n".join(output)) + if output: + self.echo_via_pager("\n".join(output)) except KeyboardInterrupt: pass -- cgit v1.2.3