Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto reconnect #2

Open
lega911 opened this issue Dec 20, 2018 · 0 comments
Open

Auto reconnect #2

lega911 opened this issue Dec 20, 2018 · 0 comments

Comments

@lega911
Copy link
Owner

lega911 commented Dec 20, 2018

from MySQLdb import OperationalError

try:
    query()
except OperationalError as e:
    if e.args[0] in (2013, 2006):
        do_reconnect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant