Skip to content
This repository was archived by the owner on Jan 24, 2018. It is now read-only.

Comments

fix bug:AttributeError: 'Connection' object has no attribute 'socket'#41

Open
wukaka wants to merge 1 commit intohit9:masterfrom
wukaka:dev
Open

fix bug:AttributeError: 'Connection' object has no attribute 'socket'#41
wukaka wants to merge 1 commit intohit9:masterfrom
wukaka:dev

Conversation

@wukaka
Copy link

@wukaka wukaka commented Mar 24, 2017

the bug has happened in Python (3.6.0) & PyMySQL (0.7.10)


def conn_is_open(self, conn):
return conn and conn.socket and conn._rfile
return conn and conn._sock and conn._rfile
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getattr(conn, 'socket', getattr(conn, '_sock'))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants