Fix: pymysql import crash in Docker environment
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:
zyc 2026-03-13 10:31:05 +08:00
parent f42eb64e25
commit b2c60a118f

View File

@ -1,2 +1,5 @@
try:
import pymysql
pymysql.install_as_MySQLdb()
except ImportError:
pass # Docker uses mysqlclient natively