Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unexpected 'decode' AttributeError when MySQLdb module is mapped …
…by PyMySQL (#336) * Skip if MySQLdb module is mapped by PyMySQL In some use cases, `pymysql.install_as_MySQLdb()` will be used to initialize a 'fake' MySQLdb module, which is actually mapped to pymysql module. Then the sw_mysqlclient plugin will change the data type of `connection.db` from bytes into str, cause the `AttributeError: 'str' object has no attribute 'decode'` exception in sw_pymysql.py line 45, which regard it as bytes.
- Loading branch information