summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith.r@gmail.com>2020-04-18 19:06:25 -0700
committerGitHub <noreply@github.com>2020-04-18 19:06:25 -0700
commit64c0b3553d247db033b902a8eb557bc4e30bcdad (patch)
tree756ced254855b46deb907d8d606528a17399f9dc
parent936475258d501b7b1fed1c80080eabfae8179970 (diff)
parent94718efc35340349935906963c286464bc135eef (diff)
Merge pull request #1171 from dbcli/bugfix/no-new-line
bugfix: don't echo a newline when output is empty.
-rw-r--r--pgcli/main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pgcli/main.py b/pgcli/main.py
index 91374cb1..a2128619 100644
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -679,7 +679,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