Skip to content

Commit

Permalink
Fix #45
Browse files Browse the repository at this point in the history
Check PEP 352. To put it simple, from 2.6 the message attribute is deprecated and removed in 3.x.
  • Loading branch information
snahor committed Jan 7, 2015
1 parent e4e9828 commit 29a1451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgcli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)],
Expand Down

0 comments on commit 29a1451

Please sign in to comment.