Skip to content

Commit

Permalink
Merge pull request #104 from ttlttl/Fix-auth-error
Browse files Browse the repository at this point in the history
To avoid AttributeError in function _request_authentication(self)
  • Loading branch information
jettify authored Sep 5, 2016
2 parents 0aa221e + d02b4a2 commit ad62a32
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 ad62a32

Please sign in to comment.