diff --git a/mwclient/RELEASE-NOTES.txt b/mwclient/RELEASE-NOTES.txt index a06bb50fda9c843e7c690285dd66c48232f54792..4c7a8ad65e21956c0fc2e9521eaac4031c3ec8d2 100644 --- a/mwclient/RELEASE-NOTES.txt +++ b/mwclient/RELEASE-NOTES.txt @@ -2,13 +2,11 @@ RELEASE NOTES FOR MWCLIENT This is mwclient 0.6.5. The following are the release notes for this version. -== Changes in version 0.6.6 == -No changes yet. - == Changes in version 0.6.5 == * Explicitly convert the Content-Length header to str, avoiding a TypeError on some versions of Python. * Fix for upload by URL +* Handle readapidenied error in site init == Changes in version 0.6.4 == * Added support for upload API diff --git a/mwclient/client.py b/mwclient/client.py index f462982fded418e0deb04154de53b80a6d6c1a68..b5bc53de090972653c7ff49a0a662381a7a577e3 100644 --- a/mwclient/client.py +++ b/mwclient/client.py @@ -92,7 +92,8 @@ class Site(object): self.site_init() except errors.APIError, e: # Private wiki, do init after login - if e[0] != u'unknown_action': raise + if e[0] not in (u'unknown_action', u'readapidenied'): + raise def site_init(self):