From d0ce83178790e7b0c36b623e46ff9682e77ede23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= <danmichaelo@gmail.com>
Date: Sun, 31 Aug 2014 00:27:25 +0200
Subject: [PATCH] Retry on internal_api_error_DBQueryError

See https://bugzilla.wikimedia.org/show_bug.cgi?id=58158
---
 mwclient/client.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mwclient/client.py b/mwclient/client.py
index 2305127..c19d178 100644
--- a/mwclient/client.py
+++ b/mwclient/client.py
@@ -191,7 +191,7 @@ class Site(object):
         self.hasmsg = 'message' in userinfo
         self.logged_in = 'anon' not in userinfo
         if 'error' in info:
-            if info['error']['code'] in (u'internal_api_error_DBConnectionError', ):
+            if info['error']['code'] in (u'internal_api_error_DBConnectionError', u'internal_api_error_DBQueryError'):
                 self.wait(token)
                 return False
             if '*' in info['error']:
-- 
GitLab