summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrina Truong <i.chernyavska@gmail.com>2020-05-07 16:41:23 -0700
committerGitHub <noreply@github.com>2020-05-07 16:41:23 -0700
commit901ef31fd176a036d20696898fbbfc15bce4d3fb (patch)
treed8124c67f12abaf72ff75fb9ab5f95c12c009209
parentbcb0c8bce776a5eba9f5425c57c2ec8385f10e94 (diff)
Fix bug introduced in #1102. (#1178)
-rw-r--r--pgcli/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pgcli/main.py b/pgcli/main.py
index cc3d58c4..080b2fd2 100644
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -1075,7 +1075,7 @@ class PGCli(object):
def echo_via_pager(self, text, color=None):
if self.pgspecial.pager_config == PAGER_OFF or self.watch_command:
click.echo(text, color=color)
- elif "pspg" in os.environ["PAGER"] and self.table_format == "csv":
+ elif "pspg" in os.environ.get("PAGER", "") and self.table_format == "csv":
click.echo_via_pager(text, color)
elif self.pgspecial.pager_config == PAGER_LONG_OUTPUT:
lines = text.split("\n")