diff options
author | laixintao <laixintaoo@gmail.com> | 2020-04-18 14:05:34 +0800 |
---|---|---|
committer | laixintao <laixintaoo@gmail.com> | 2020-04-18 14:05:34 +0800 |
commit | 94718efc35340349935906963c286464bc135eef (patch) | |
tree | 62f3054da34c1e5c48639faf94cfad0df9e9fa91 | |
parent | 005fd2fcee258ae192ed01d503303068558b0e89 (diff) |
bugfix: don't echo a newline when output is empty.
-rw-r--r-- | pgcli/main.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |