Don't try to decode connection error strings that are null.

pull/3/head
George Gelashvili 2017-02-16 16:42:19 +00:00 committed by Dave Page
parent 03f292ce51
commit 03a161cc0a
1 changed files with 1 additions and 1 deletions

View File

@ -584,7 +584,7 @@ class ServerNode(PGChildNodeView):
password=password,
server_types=ServerType.types()
)
if hasattr(str, 'decode'):
if hasattr(str, 'decode') and errmsg is not None:
errmsg = errmsg.decode('utf-8')
if not status:
db.session.delete(server)