summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Roman <hans.r.69@gmail.com>2015-01-07 00:51:09 -0500
committerHans Roman <hans.r.69@gmail.com>2015-01-07 00:51:09 -0500
commit29a1451210a111b0038e593962973cc12fc23796 (patch)
tree989ebf1fd244869e4f4f3c9c19922e381069874b
parente4e9828640fc9046f65fb3791627a8ca91ad7e55 (diff)
Fix #45
Check PEP 352. To put it simple, from 2.6 the message attribute is deprecated and removed in 3.x.
-rwxr-xr-xpgcli/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pgcli/main.py b/pgcli/main.py
index b8f9cad8..9a65ed23 100755
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -73,8 +73,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)],