Fix: pymysql import crash in Docker environment
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m59s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 1m59s
Docker installs mysqlclient natively, so pymysql isn't needed. Use try/except to handle both environments gracefully.
This commit is contained in:
parent
f42eb64e25
commit
b2c60a118f
@ -1,2 +1,5 @@
|
||||
try:
|
||||
import pymysql
|
||||
pymysql.install_as_MySQLdb()
|
||||
except ImportError:
|
||||
pass # Docker uses mysqlclient natively
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user