summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmjith Ramanujam <amjith.r@gmail.com>2015-01-06 22:29:40 -0800
committerAmjith Ramanujam <amjith.r@gmail.com>2015-01-06 22:29:40 -0800
commit835a24252f6c31846349bd84fd2d543cb8046556 (patch)
treeddf1b91d3d12d6f36fc0338fef54e229b4eeb351
parent3f78ce7d643e10034795cd51405dff39b944b1f5 (diff)
parent29a1451210a111b0038e593962973cc12fc23796 (diff)
Merge pull request #50 from snahor/patch-1
Fix #45
-rwxr-xr-xpgcli/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pgcli/main.py b/pgcli/main.py
index 9f655a38..408a5047 100755
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -74,8 +74,8 @@ def cli(database, user, password, host, port):
try:
pgexecute = PGExecute(database, user, passwd, host, port)
except Exception as e: # Connecting to a database could fail.
- _logger.debug('Database connection failed: %r.', e.message)
- click.secho(e.message, err=True, fg='red')
+ _logger.debug('Database connection failed: %r.', e)
+ click.secho(str(e), err=True, fg='red')
exit(1)
layout = Layout(before_input=DefaultPrompt('%s> ' % pgexecute.dbname),
menus=[CompletionsMenu(max_height=10)],