diff --git a/mwclient/client.py b/mwclient/client.py index 54677c90d658813acaadc70c61376093d6e27f9e..f6d869b2617587282ef5945a253c4289d363a48e 100644 --- a/mwclient/client.py +++ b/mwclient/client.py @@ -290,7 +290,7 @@ class Site(object): if login['login']['result'] == 'Success': break elif login['login']['result'] == 'Throttled': - self.wait(wait_token, login['login']['wait']) + self.wait(wait_token, login['login'].get('wait', 5)) else: raise errors.LoginError(self, login['login']) diff --git a/mwclient/http.py b/mwclient/http.py index 6fb1619e8d60b8b8f5b9ad91d50c7535c037a166..2a82fdb8dc4c3a45499380549d52efbe291d346c 100644 --- a/mwclient/http.py +++ b/mwclient/http.py @@ -117,7 +117,6 @@ class HTTPPersistentConnection(object): path = location[2] if location[4]: path = path + '?' + location[4] - print location[0] if location[0].lower() != self.scheme_name: raise errors.HTTPRedirectError, ('Only HTTP connections are supported', res.getheader('Location'))