Skip to content

Conversation

@linsir
Copy link

@linsir linsir commented Aug 7, 2017

No description provided.

FIELD_TYPE = MySQLdb.constants.FIELD_TYPE
FLAG = MySQLdb.constants.FLAG
CONVERSIONS = copy.copy(MySQLdb.converters.conversions)
if MySQLdb.__package__ != 'pymysql':
Copy link
Owner

Choose a reason for hiding this comment

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

MySQLdb may be None (see the comments above about readthedocs). There is no guarantee that the __package__ attribute is present. I think it's better to set a variable in the import block at the top to say which module is in use.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants