Skip to content

Commit

Permalink
To avoid AttributeError in function _request_authentication(self)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttlttl committed Sep 5, 2016
1 parent 0aa221e commit d02b4a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions aiomysql/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def __init__(self, host="localhost", user=None, password="",
# user
self._close_reason = None

self._auth_plugin_name = ""

@property
def host(self):
"""MySQL server IP address or name"""
Expand Down Expand Up @@ -756,6 +758,7 @@ def _get_server_information(self):
i += salt_len

i += 1

# AUTH PLUGIN NAME may appear here.
if self.server_capabilities & CLIENT.PLUGIN_AUTH and len(data) >= i:
# Due to Bug#59453 the auth-plugin-name is missing the terminating
Expand Down

0 comments on commit d02b4a2

Please sign in to comment.